flow.schedule.
Setting it up
- Add a trigger to the flow and choose Schedule.
-
Enter the Cron expression: five fields — minute, hour, day of month, month, day of week. For example:
A schedule runs at most once a minute: an expression with a sixth field (seconds) is refused.
-
Enter the Time zone as an IANA name, such as
Europe/Berlin,America/New_YorkorUTC. The cron is read in that zone, so0 9 * * *inEurope/Berlinruns at nine in Berlin, in winter and in summer. - Publish the flow. Adding, changing or removing a schedule needs Manage automations.
invalid_schedule_cron) and a time zone that is not an IANA
name (invalid_schedule_timezone).
The first run is the first moment of the schedule after the publish. Publishing again without changing the cron or the
time zone keeps the schedule where it is; changing either one, or switching the trigger off and on again, starts it
afresh from the moment of the publish. Switching the trigger off, deleting it or deleting the flow stops it; deleting
the flow also cancels a run of the schedule that is waiting to start within its minute, while a run that has already
started keeps the flow from being deleted until it ends. Deleting the assistant the flow belongs to stops the schedule
too, at its next moment.
A schedule published before your installation was upgraded to the release that runs schedules does not run until
its flow is published again.
When it runs and when it does not
- One run at a time. If the previous run of the trigger is still going — running, sleeping in a Delay block,
waiting for an answer or for a subflow — the next moment is skipped, not queued. The skip is written to the log as
flow.schedule.tick_skipped. - No catching up. Moments that pass while the platform or the workspace is down (or stopped) are not run
afterwards. A moment is still run if it is picked up up to five minutes late; after a longer outage the schedule logs
flow.schedule.tick_missedonce and continues with its next moment. - One run per pass. Each pass runs at most one moment of a trigger, the earliest one due. When a pass comes late
and more moments of a frequent schedule have come due meanwhile (
* * * * *picked up at 09:02 runs 09:00), the later ones are not run; they are logged as oneflow.schedule.tick_missedline with their count,missed_slots. Such lines without an outage mean the passes take longer than a minute. - Daylight saving time. A time that does not exist on the day clocks go forward (02:30 in Berlin on the last Sunday of March) does not run that day. A time that happens twice on the day clocks go back runs once, the first time.
- Within the minute. Runs of the same minute are spread over its sixty seconds, so a schedule may start a few seconds after the full minute; each trigger always gets the same offset.
- A flow that is not published, or whose published version is switched off, does not run; the moment is skipped and logged.
- A flow switched off in the flows list does not run either; the moment is skipped and logged (at the info level) as
flow.schedule.tick_skippedwith the reasonflow_off. Turning the flow back on starts its next moment, never the ones it skipped. - A paused trigger, or a workspace whose plan has no runs left, does not run either; the moment is skipped and counted on the trigger (see Publishing).
What the flow receives
The flow has no contact, so blocks that need one cannot be published in it; see Publishing.
For operators
Schedules are run byflow:fire-scheduled-triggers, which the scheduler starts every minute; without
php artisan schedule:run every minute (Services) no schedule runs. The command looks up
which workspaces have something due in a table of the platform database, flow_schedule_registry, created by the
landlord migration, and enters only those. flow:rebuild-schedule-registry rewrites that table from the workspaces
every hour.