Run it on a schedule
A schedule starts a published script or flow on a timetable — every hour, every weekday at 9:00, the first of the month — with the inputs you set once. Nobody has to be signed in. In this lesson you schedule daily-report, check when it will run, watch a scheduled run arrive, and pause it so the exercise does not keep running.
- Create a schedule from the editor’s Triggers tab or the Schedules page
- Set the timetable and read the next runs before saving
- Decide what happens when a scheduled run fails
- Pause and resume a schedule
What a schedule runs
A schedule always runs the published version of its target — there is no version to pick. Publish a fix and the next firing uses it; edit the draft and the schedule does not notice. That is why the target list marks items that were never published as Not published, and the Triggers tab asks you to Publish first — a schedule runs the published version.
You can create the same schedule from two places, and they edit the same thing: the Schedules page of the project, which lists every schedule, and the Triggers tab in the script editor, which shows only the schedules of that script (Add schedule, Open in Schedules).
Schedule daily-report
- What: pick the target
Open Schedules and press New Schedule (or Add schedule in the script’s Triggers tab, which fills this step for you). Under What should run? pick
daily-report. Its inputs appear: leavepassingat 80 — these values are sent on every run. - When: set the timetable
Choose Weekly, tick Monday to Friday, set At to 09:00 and check the Timezone. The preview lists the Next runs: — read them before going on. Custom takes a cron expression instead.
- If it fails, then Review
If something goes wrong is optional — press Skip for now. In Review, name the schedule
daily-report weekdays, keep it switched on and press Create schedule. It appears in the list as Active, with its Next Run. - Pause it when you are done
After the first scheduled run, open the schedule’s menu and press Pause (or Pause schedule in the Triggers tab). A paused schedule keeps its settings and shows no next run; Resume brings it back.
Timetables and cron
| Frequency | Example | Same as cron |
|---|---|---|
| Every N min | Every 15 minutes | */15 * * * * |
| Hourly | At minute 0: 9:00, 10:00, 11:00… | 0 * * * * |
| Daily | At 07:30 | 30 7 * * * |
| Weekly | Mon–Fri at 09:00 | 0 9 * * 1-5 |
| Monthly | On day 1 at 06:00 | 0 6 1 * * |
A cron expression has five fields — min hour day month weekday — and is read in the schedule’s timezone, never your browser’s. The preview is not shown for Custom, so check the first runs on the list after saving.
# min hour day month weekday
0 9 * * 1-5 # 09:00, Monday to FridayWhen a scheduled run fails
- Retry on failure starts a failed run again, up to the number of times you set.
- If the previous run of this schedule is still active: Skip — wait for it to finish (the default) or Run in parallel.
- Run on failure starts another script or flow — a message to you, a clean-up. For notifications without code, use Alerts.
Limits
- Your plan sets the shortest interval a schedule may use; the form names it beside the interval (Your plan runs schedules at most every N min).
- A firing that cannot start — no credits, a missing input, nothing published — is recorded as Didn’t start with its reason, and counted in the overview panel’s Reliability.