Manage Runners
Documentation menu

Schedules

Pause and resume runners automatically on a weekly timetable to save server costs.

A schedule resumes a runner at a start time and pauses it at a stop time, on the days of the week you choose. A runner that only runs during working hours, for example, costs server time only then; its IPv4 address is billed while it is paused too, on DigitalOcean at USD 5 a month for the reserved IPv4. The GitLab CI cost comparison calculates what a schedule saves with current prices.

Schedules need a Pro or Enterprise plan for the runner’s organization. See Billing and plans. Without one, the dashboard shows nothing about schedules.

You can manage schedules in the dashboard, with the manage-runners CLI or with the API.

Schedules in the dashboard

Each runner card shows its schedule below the actions, for example Mon–Fri · 08:00–18:00 · Europe/Berlin, with what happens next, such as Next: pauses at 18:00. Owners and editors can also:

  • Add a schedule: select Add schedule on a card without one.
  • Edit it: select the pencil next to the schedule.
  • Enable or disable it: use the switch next to the schedule.

The schedule dialog has these settings:

  • Days: select the days, or use Weekdays, Every day or Weekends.
  • Start: when the window starts.
  • Stop: At time for a stop time later on the same day, or After for a duration of up to 24 hours. A duration can run past midnight.
  • Time zone: search for an IANA time zone. A new schedule uses your browser’s time zone.
  • Enabled: switch it off to keep the schedule without applying it.

A preview of a typical week shows when the runner is scheduled to run and for how many hours a week; on days when daylight saving time changes, the window can shift. Save schedule stores it. Delete schedule asks for confirmation, then deletes it; the runner stays as it is, running or paused.

Viewers see the schedule without the switch and the edit actions.

How a schedule works

A schedule has:

Setting Description
Time zone An IANA time zone, for example Europe/Berlin. Start and stop times are in this zone, including daylight saving time.
Start time When the runner is resumed, as HH:MM.
Stop time or duration When the runner is paused: a time later on the same day, or a duration of 1 to 1440 minutes.
Days One or more of Mon, Tue, Wed, Thu, Fri, Sat, Sun.
Enabled Whether the schedule is applied. A disabled schedule is kept but does nothing.

Each runner has at most one schedule. Manage Runners checks schedules every minute:

  • During the window, from the start time until the stop time, a paused runner is resumed.
  • At the stop time, an active runner is paused. The runner first lets its running jobs finish and takes no new ones, for at most one hour, like Pause after running jobs; see Pause and resume. If the next start comes while it is still pausing, it is resumed once it is paused.

Manage Runners records each start and stop it has applied and never applies a recorded one again. A start is recorded when the runner is resumed, or is found already active, during the window. A stop is recorded only when Manage Runners pauses an active runner. In practice:

  • If you pause a runner by hand during its window after the start was applied, it stays paused until the next start.
  • If a runner is already paused at the stop time, that stop is not recorded. If you then resume it by hand before the next start, it is paused again within a minute.
  • If you pause a runner during its window before the start was applied, it is resumed within a minute.

To override a schedule reliably, for example to keep a runner running one evening, disable the schedule first, with the switch on its card or with the CLI, and enable it again afterwards.

A stop time must be later than the start time on the same day, so a window given by start and stop times cannot cross midnight.

Example

Run on weekdays from 07:00 to 19:00 Berlin time:

manage-runners schedule set --runner-id 812999368881481087 \
  --zone-id Europe/Berlin --start 07:00 --stop 19:00 \
  --day Mon --day Tue --day Wed --day Thu --day Fri --enabled

Use --duration-minutes 720 instead of --stop 19:00 to give the window a length. See Schedules with the CLI for reading, disabling and deleting schedules.

What happens to a schedule

  • Deleting a runner deletes its schedule.
  • Resuming by schedule creates a new server, like resuming by hand. See Pause and resume.
  • Deleting a schedule leaves the runner as it is, running or paused.
  • Disabling keeps the settings, so you can enable the schedule again later.