Merge branch 'ent-12729-guardia-16873-problemas-con-tareas-de-la-consola' into 'develop'

Ent 12729 guardia 16873 problemas con tareas de la consola

See merge request artica/pandorafms!6832
This commit is contained in:
Rafael Ameijeiras 2024-01-19 08:17:29 +00:00
commit 8f9200cdd9
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.