#12729 Fixed weekly task

This commit is contained in:
Daniel Maya 2024-01-08 16:10:07 +01:00
parent d9b400d4ee
commit 64b0bb55a8
1 changed files with 7 additions and 0 deletions

View File

@ -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.