#12729 Fixed weekly task
This commit is contained in:
parent
d9b400d4ee
commit
64b0bb55a8
|
@ -383,6 +383,13 @@ function cron_task_run(
|
|||
$nameday = strtolower($datetime->format('l'));
|
||||
}
|
||||
}
|
||||
} else if (empty($old_args['first_execution']) === false) {
|
||||
$datetime = new DateTime();
|
||||
$datetime->setTimestamp($old_args['first_execution']);
|
||||
$datetime->modify('+7 day');
|
||||
$weekly_date = $datetime->format('Y-m-d');
|
||||
$weekly_time = $datetime->format('H:i:s');
|
||||
$old_args['first_execution'] = strtotime($weekly_date.' '.$weekly_time);
|
||||
}
|
||||
} else {
|
||||
// Add it to next execution.
|
||||
|
|
Loading…
Reference in New Issue