Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Webslice
ISPConfig 3
Commits
2e3887d0
Commit
2e3887d0
authored
Sep 02, 2019
by
Marius Burkard
Browse files
- changed the way cron_debug.php calls cron job classes
parent
24b60e9c
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/cron_debug.php
View file @
2e3887d0
...
...
@@ -61,12 +61,7 @@ if(preg_match('/^\d+\-(.*)$/', $name, $match)) $name = $match[1]; // strip numer
include
$path
.
'/'
.
$cronjob_file
;
$class_name
=
'cronjob_'
.
$name
;
$cronjob
=
new
$class_name
();
$cronjob
->
onPrepare
();
$cronjob
->
onBeforeRun
();
$cronjob
->
onRunJob
();
$cronjob
->
onAfterRun
();
$cronjob
->
onCompleted
();
$cronjob
->
run
(
true
);
die
(
"finished.
\n
"
);
...
...
server/lib/classes/cronjob.inc.php
View file @
2e3887d0
...
...
@@ -76,14 +76,14 @@ class cronjob {
/** run through cronjob sequence **/
public
function
run
()
{
public
function
run
(
$debug_mode
=
false
)
{
global
$conf
;
if
(
$conf
[
'log_priority'
]
<=
LOGLEVEL_DEBUG
)
print
"Called run() for class "
.
get_class
(
$this
)
.
"
\n
"
;
if
(
$conf
[
'log_priority'
]
<=
LOGLEVEL_DEBUG
)
print
"Job has schedule: "
.
$this
->
getSchedule
()
.
"
\n
"
;
$this
->
onPrepare
();
$run_it
=
$this
->
onBeforeRun
();
if
(
$run_it
==
true
)
{
if
(
$run_it
==
true
||
$debug_mode
===
true
)
{
$this
->
onRunJob
();
$this
->
onAfterRun
();
$this
->
onCompleted
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment