Skip to content

Commit ea2caf9

Browse files
committed
fix: calcolo scadenza task
1 parent 69e1e78 commit ea2caf9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Tasks/Task.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public function registerMissedExecution(Carbon $now)
9898
public function registerNextExecution(Carbon $now)
9999
{
100100
$cron = CronExpression::factory($this->expression);
101-
$this->next_execution_at = Carbon::instance($cron->getNextRunDate($now));
101+
$next_time = $now->copy()->addSecond();
102+
$this->next_execution_at = Carbon::instance($cron->getNextRunDate($next_time));
102103
}
103104

104105
public function delete()

0 commit comments

Comments
 (0)