You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The routing precedence is: schedule fields → workflow class defaults → global queue config.
216
216
217
+
## Jitter
218
+
219
+
When multiple schedules share the same cron expression, they all fire at the exact same instant, creating a thundering-herd spike. The `jitterSeconds` parameter spreads triggers across a random window to smooth the load.
220
+
221
+
```php
222
+
$schedule = ScheduleManager::create(
223
+
scheduleId: 'hourly-report',
224
+
workflowClass: ReportWorkflow::class,
225
+
cronExpression: '0 * * * *',
226
+
jitterSeconds: 300, // fire within 0–300 seconds after the top of the hour
227
+
);
228
+
```
229
+
230
+
When `jitterSeconds` is set, each computed `next_fire_at` is offset by a random value between 0 and `jitterSeconds` (inclusive). The jitter is re-rolled every time the next fire time is calculated — after a trigger, after a resume, or after an update.
231
+
232
+
Jitter applies only to the tick-evaluation fire time stored in the database. Backfill enumeration always uses canonical (unjittered) cron times so that backfilled occurrences land on exact cron boundaries.
233
+
234
+
Setting `jitterSeconds` to `0` (the default) disables jitter entirely — fire times are exact cron matches.
235
+
217
236
## History event types
218
237
219
238
When a schedule triggers a workflow, a `ScheduleTriggered` history event is recorded on the started workflow run. This provides lineage from the schedule to the workflow:
0 commit comments