When re-enabling dynamic items, ensure the next_at date is from today, not from when it was last run
This commit is contained in:
parent
33a97ce5b3
commit
445dd48c81
@ -74,18 +74,27 @@ final class Dynamic extends Send
|
||||
$this->do->next_at = $next_at
|
||||
->addDay();
|
||||
|
||||
while ($this->do->next_at->isPast())
|
||||
$this->do->next_at->addDay();
|
||||
|
||||
break;
|
||||
|
||||
case 'WEEKLY':
|
||||
$this->do->next_at = $next_at
|
||||
->addWeek();
|
||||
|
||||
while ($this->do->next_at->isPast())
|
||||
$this->do->next_at->addWeek();
|
||||
|
||||
break;
|
||||
|
||||
case 'MONTHLY':
|
||||
$this->do->next_at = $next_at
|
||||
->addMonth();
|
||||
|
||||
while ($this->do->next_at->isPast())
|
||||
$this->do->next_at->addMonth();
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user