From e01da5b38ff8a59ba19109e26e0789685ba43332 Mon Sep 17 00:00:00 2001 From: Oldperl <44996956+oldperl@users.noreply.github.com> Date: Fri, 7 Oct 2016 16:36:06 +0000 Subject: [PATCH] made pseudocron logging configurable in config misc --- conlite/includes/pseudo-cron.inc.php | 2 +- data/config/production/config.misc.php | 5 +++- data/logs/pseudo-cron.log | 40 ++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 data/logs/pseudo-cron.log diff --git a/conlite/includes/pseudo-cron.inc.php b/conlite/includes/pseudo-cron.inc.php index a57981c..c83056a 100644 --- a/conlite/includes/pseudo-cron.inc.php +++ b/conlite/includes/pseudo-cron.inc.php @@ -132,7 +132,7 @@ $PC_jobDir = $cfg['path']['conlite'] . $cfg['path']['cronjobs']; $PC_reqDir = getcwd(); // control logging, 1=use log file, 0=don't use log file -$PC_useLog = 1; +$PC_useLog = $cfg["pseudocron"]["logging"]; // turn on / off debugging output // DO NOT use this on live servers! diff --git a/data/config/production/config.misc.php b/data/config/production/config.misc.php index 60f3119..cf1d9c3 100644 --- a/data/config/production/config.misc.php +++ b/data/config/production/config.misc.php @@ -51,7 +51,10 @@ $cfg["develop"]["show_errors"] = false; $cfg["develop"]["show_deprecated"] = false; /* Use Pseudo-Cron? */ -$cfg["use_pseudocron"] = true; +$cfg["use_pseudocron"] = TRUE; + +/* Config Pseudo-Cron */ +$cfg["pseudocron"]["logging"] = TRUE; /* If you want to measure function timing set this to true */ $cfg["debug"]["functiontiming"] = false; diff --git a/data/logs/pseudo-cron.log b/data/logs/pseudo-cron.log new file mode 100644 index 0000000..c22014e --- /dev/null +++ b/data/logs/pseudo-cron.log @@ -0,0 +1,40 @@ +Running */1 * * * * move_articles.php + Last run: Thu, 01 Jan 1970 01:00:00 +0100 + Last scheduled: Fri, 07 Oct 2016 18:15:00 +0200 +Completed */1 * * * * move_articles.php +Running */5 * * * * send_reminder.php + Last run: Thu, 01 Jan 1970 01:00:00 +0100 + Last scheduled: Fri, 07 Oct 2016 18:15:00 +0200 +Completed */5 * * * * send_reminder.php +Running 0 0 1 * * move_old_stats.php + Last run: Thu, 01 Jan 1970 01:00:00 +0100 + Last scheduled: Sat, 01 Oct 2016 00:00:00 +0200 +Completed 0 0 1 * * move_old_stats.php +Running */5 * * * * session_cleanup.php + Last run: Thu, 01 Jan 1970 01:00:00 +0100 + Last scheduled: Fri, 07 Oct 2016 18:15:00 +0200 +Completed */5 * * * * session_cleanup.php +Running 0 0 * * * optimize_database.php + Last run: Thu, 01 Jan 1970 01:00:00 +0100 + Last scheduled: Fri, 07 Oct 2016 00:00:00 +0200 +Completed 0 0 * * * optimize_database.php +Running */5 * * * * setfrontenduserstate.php + Last run: Thu, 01 Jan 1970 01:00:00 +0100 + Last scheduled: Fri, 07 Oct 2016 18:15:00 +0200 +Completed */5 * * * * setfrontenduserstate.php +Running */1 * * * * move_articles.php + Last run: Fri, 07 Oct 2016 18:15:00 +0200 + Last scheduled: Fri, 07 Oct 2016 18:27:00 +0200 +Completed */1 * * * * move_articles.php +Running */5 * * * * send_reminder.php + Last run: Fri, 07 Oct 2016 18:15:00 +0200 + Last scheduled: Fri, 07 Oct 2016 18:25:00 +0200 +Completed */5 * * * * send_reminder.php +Running */5 * * * * session_cleanup.php + Last run: Fri, 07 Oct 2016 18:15:00 +0200 + Last scheduled: Fri, 07 Oct 2016 18:25:00 +0200 +Completed */5 * * * * session_cleanup.php +Running */5 * * * * setfrontenduserstate.php + Last run: Fri, 07 Oct 2016 18:15:00 +0200 + Last scheduled: Fri, 07 Oct 2016 18:25:00 +0200 +Completed */5 * * * * setfrontenduserstate.php