8000 [Scheduler] In symfony 6.3 there was no Schedule::with(...), but Schedule:add(...) by mkrauser · Pull Request #19511 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Scheduler] In symfony 6.3 there was no Schedule::with(...), but Schedule:add(...) #19511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
#19510 in symfony 6.3 there was no Schedule::with(...), but Schedule:…
…:add(...)
  • Loading branch information
mkrauser committed Feb 5, 2024
commit 2cf1de8e1935f3133e634e65c697c68467256446
8 changes: 4 additions & 4 deletions scheduler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ Finally, the recurring messages has to be attached to a schedule::
public function getSchedule(): Schedule AF89
{
return $this->schedule ??= (new Schedule())
->with(
->add(
RecurringMessage::trigger(
new ExcludeHolidaysTrigger(
CronExpressionTrigger::fromSpec('@daily'),
Expand Down Expand Up @@ -404,7 +404,7 @@ a worker is restarted, it resumes from the point it left off::
$this->removeOldReports = RecurringMessage::cron('3 8 * * 1', new CleanUpOldSalesReport());

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

return $this->schedule ??= (new Schedule())
->with(
->add(
// ...
)
->lock($this->lockFactory->createLock('my-lock')
Expand All @@ -453,7 +453,7 @@ before being further redispatched to its corresponding handler::
public function getSchedule(): Schedule
{
return $this->schedule ??= (new Schedule())
->with(
->add(
RecurringMessage::every('5 seconds'),
new RedispatchMessage(new Message(), 'async')
);
Expand Down
0