Your first automationLesson 7 of 8

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.

What you will learn
  • 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.

SchedulesAutomate scripts and flows to run on a recurring schedule
New schedule
Search schedules…AllActivePausedScriptsFlows
morning_reportWeekdays at 08:00 · report.pyNext runMon 08:00Last run4 h agoStatusActive
sync_ordersEvery 15 min · greet.pyNext runin 9 minLast run6 min agoStatusActive
weekly_campaignMondays at 09:30 · campaignNext runMon 09:30Last run6 d agoStatusActive
late_remindersDaily at 18:00 · approvalNext run—Last run—StatusPaused
The Schedules page: each schedule with its target, timetable, next run and status, and the overview panel on the right.

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

  1. 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: leave passing at 80 — these values are sent on every run.

  2. 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.

  3. 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.

  4. 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

FrequencyExampleSame as cron
Every N minEvery 15 minutes*/15 * * * *
HourlyAt minute 0: 9:00, 10:00, 11:00…0 * * * *
DailyAt 07:3030 7 * * *
WeeklyMon–Fri at 09:000 9 * * 1-5
MonthlyOn day 1 at 06:000 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.

Shellcron.txt
# min hour day month weekday
0 9 * * 1-5     # 09:00, Monday to Friday

When 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.
7 / 8