mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 22:33:44 +02:00
Fix error spam in logs due to missing cron month
This commit is contained in:
@@ -122,13 +122,14 @@ class Schedule extends Model
|
||||
* Returns the schedule's execution crontab entry as a string.
|
||||
*
|
||||
* @return \Carbon\CarbonImmutable
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function getNextRunDate()
|
||||
{
|
||||
$formatted = sprintf('%s %s %s %s %s', $this->cron_minute, $this->cron_hour, $this->cron_day_of_month, $this->cron_month, $this->cron_day_of_week);
|
||||
|
||||
return CarbonImmutable::createFromTimestamp(
|
||||
CronExpression::factory($formatted)->getNextRunDate()->getTimestamp()
|
||||
(new CronExpression($formatted))->getNextRunDate()->getTimestamp()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user