File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change 6161include $ 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
7166die ("finished. \n" );
7267
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments