8000 #19510 in symfony 6.3 there was no Schedule::with(...), but Schedule:… · symfony/symfony-docs@2cf1de8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2cf1de8

Browse files
committed
#19510 in symfony 6.3 there was no Schedule::with(...), but Schedule::add(...)
1 parent de4e978 commit 2cf1de8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scheduler.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ Finally, the recurring messages has to be attached to a schedule::
318318
public function getSchedule(): Schedule
319319
{
320320
return $this->schedule ??= (new Schedule())
321-
->with(
321+
->add(
322322
RecurringMessage::trigger(
323323
new ExcludeHolidaysTrigger(
324324
CronExpressionTrigger::fromSpec('@daily'),
@@ -404,7 +404,7 @@ a worker is restarted, it resumes from the point it left off::
404404
$this->removeOldReports = RecurringMessage::cron('3 8 * * 1', new CleanUpOldSalesReport());
405405

406406
return $this->schedule ??= (new Schedule())
407-
->with(
407+
->add(
408408
// ...
409409
)
410410
->stateful($this->cache)
@@ -426,7 +426,7 @@ same task more than once::
426426
$this->removeOldReports = RecurringMessage::cron('3 8 * * 1', new CleanUpOldSalesReport());
427427

428428
return $this->schedule ??= (new Schedule())
429-
->with(
429+
->add(
430430
// ...
431431
)
432432
->lock($this->lockFactory->createLock('my-lock')
@@ -453,7 +453,7 @@ before being further redispatched to its corresponding handler::
453453
public function getSchedule(): Schedule
454454
{
455455
return $this->schedule ??= (new Schedule())
456-
->with(
456+
->add(
457457
RecurringMessage::every('5 seconds'),
458458
new RedispatchMessage(new Message(), 'async')
459459
);

0 commit comments

Comments
 (0)
0