Skip to content

Commit 2e3887d

Browse files
author
Marius Burkard
committed
- changed the way cron_debug.php calls cron job classes
1 parent 24b60e9 commit 2e3887d

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

server/cron_debug.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,7 @@
6161
include $path . '/' . $cronjob_file;
6262
$class_name = 'cronjob_' . $name;
6363
$cronjob = new $class_name();
64-
65-
$cronjob->onPrepare();
66-
$cronjob->onBeforeRun();
67-
$cronjob->onRunJob();
68-
$cronjob->onAfterRun();
69-
$cronjob->onCompleted();
64+
$cronjob->run(true);
7065

7166
die("finished.\n");
7267

server/lib/classes/cronjob.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ public function getSchedule() {
7676

7777

7878
/** run through cronjob sequence **/
79-
public function run() {
79+
public function run($debug_mode = false) {
8080
global $conf;
8181

8282
if($conf['log_priority'] <= LOGLEVEL_DEBUG) print "Called run() for class " . get_class($this) . "\n";
8383
if($conf['log_priority'] <= LOGLEVEL_DEBUG) print "Job has schedule: " . $this->getSchedule() . "\n";
8484
$this->onPrepare();
8585
$run_it = $this->onBeforeRun();
86-
if($run_it == true) {
86+
if($run_it == true || $debug_mode === true) {
8787
$this->onRunJob();
8888
$this->onAfterRun();
8989
$this->onCompleted();

0 commit comments

Comments
 (0)