cronSchedule
Specifies a cron trigger for scheduled flows.
Schema¶
Properties¶
Property | Type | Description |
---|---|---|
cron |
str |
Cron string defining the schedule. |
display_name |
str | None |
Name of the schedule to be displayed in the dashboard. |
time_zone |
str | None |
Time zone for the schedule in the tzdata format. |
Remarks¶
The cron
property must be a valid cron string. A malformed cron string will result in a failure to schedule a flow.
If the time_zone
property is not provided, UTC will be used. If specified, it must conform to the tz database format.
Examples¶
Running tasks on a schedule¶
To schedule a flow to run every day at 00:00:00 UTC, you can use the following cron schedule:
Customising time zones¶
It's common practice for quantum-as-a-service providers to specify scheduled downtime for performing routine maintenance of hardware, such as calibration. The downtime window is chosen to cause minimal disruption for customers, meaning it usually occurs at night. If you have multiple QPUs serving customers in multiple time zones, you can either keep track of them all in UTC (including daylight saving time changes!) or simply use the time_zone
property.
For instance, if your QPU is in Munich, Germany, and you want your flow to run every day at 03:00:00 at night local time, you can use the following cron schedule:
On the other hand, a similar schedule but in Tokyo, Japan, will read like this:
Now your flows will run exactly on time, regardless of local daylight saving time changes.