diff --git a/pandora_console/include/functions_cron_task.php b/pandora_console/include/functions_cron_task.php index 40a6e159cc..042d79dad7 100644 --- a/pandora_console/include/functions_cron_task.php +++ b/pandora_console/include/functions_cron_task.php @@ -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.