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
|
$this->do->next_at = $next_at
|
||||||
->addDay();
|
->addDay();
|
||||||
|
|
||||||
|
while ($this->do->next_at->isPast())
|
||||||
|
$this->do->next_at->addDay();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'WEEKLY':
|
case 'WEEKLY':
|
||||||
$this->do->next_at = $next_at
|
$this->do->next_at = $next_at
|
||||||
->addWeek();
|
->addWeek();
|
||||||
|
|
||||||
|
while ($this->do->next_at->isPast())
|
||||||
|
$this->do->next_at->addWeek();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'MONTHLY':
|
case 'MONTHLY':
|
||||||
$this->do->next_at = $next_at
|
$this->do->next_at = $next_at
|
||||||
->addMonth();
|
->addMonth();
|
||||||
|
|
||||||
|
while ($this->do->next_at->isPast())
|
||||||
|
$this->do->next_at->addMonth();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user