aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_cron.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_cron.lua b/plugins/mod_cron.lua
index cff7b4df..2c757574 100644
--- a/plugins/mod_cron.lua
+++ b/plugins/mod_cron.lua
@@ -82,7 +82,7 @@ module:add_item("shell-command", {
name = "tasks";
desc = "View registered tasks";
args = {};
- handler = function (self, host)
+ handler = function (self, filter_host)
local format_table = require "prosody.util.human.io".table;
local it = require "util.iterators";
local row = format_table({
@@ -94,7 +94,7 @@ module:add_item("shell-command", {
}, self.session.width);
local print = self.session.print;
print(row());
- for host in it.sorted_pairs(host and { [host]=true } or active_hosts) do
+ for host in it.sorted_pairs(filter_host and { [filter_host]=true } or active_hosts) do
for _, task in ipairs(module:context(host):get_host_items("task")) do
print(row { host, task.id, task.name, task.when, task.last and os.date("%Y-%m-%d %R:%S", task.last) or "never" });
--self.session.print(require "util.serialization".serialize(task, "debug"));