Skip to content

Commit b618b53

Browse files
committed
minor #19511 [Scheduler] In symfony 6.3 there was no Schedule::with(...), but Schedule:add(...) (mkrauser)
This PR was merged into the 6.3 branch. Discussion ---------- [Scheduler] In symfony 6.3 there was no Schedule::with(...), but Schedule:add(...) fixes #19510 Commits ------- 2cf1de8 #19510 in symfony 6.3 there was no Schedule::with(...), but Schedule::add(...)
2 parents de4e978 + 2cf1de8 commit b618b53

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scheduler.rst

+4-4
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)