cronkit.org
Cron expressions, explained and converted — in your browser

Cron tools › Platforms

GitLab pipeline schedule cron

fugit 1.11.2 · Cron timezone per schedule · schedule worker every 5 minutes on GitLab.com

Type the custom Interval Pattern of a scheduled pipeline. It is checked with the rules of fugit, the Ruby parser GitLab uses — including the #, L and & extensions Linux cron does not have — and the next runs are listed in the schedule's Cron timezone, with when GitLab's schedule worker will pick each one up.

Next runs

Create the schedule

Try one

How to schedule a GitLab pipeline

  1. Type the cron. Five fields as in Linux cron, or six with seconds first; @daily, @noon and the other shorthands work too.
  2. Pick the Cron timezone. Do not put a zone inside the cron itself: GitLab adds the Cron timezone to the string, and two zones make it invalid.
  3. Read the messages, especially when both day fields are set: GitLab runs on either day unless you add &.
  4. Create it under Build › Pipeline schedules › New schedule, or with the API call below.
  5. To run some jobs only in scheduled pipelines, add the $CI_PIPELINE_SOURCE == "schedule" rule to them.

What GitLab accepts that Linux cron does not

SyntaxMeaning in GitLab (fugit)Linux cron
0 0 * * 1#2Second Monday of the month (#1 to #5)No #
0 7 * * fri#LLast Friday (#L, #last or #-1; #-2 is the second-to-last)No #
0 0 L * *Last day of the month (L or last); -3 is the third-to-last dayNo L
0 0 */2 * 1-5Odd days or weekdays — */2 counts as a restrictionOdd days that are weekdays: a field starting with * makes cron AND the days
0 0 */2 * 1-5&& after a day field makes the two day fields ANDNo &
15/30 * * * *Minutes 15 and 45 (read as 15-59/30)Write 15-59/30
0 22-2 * * *Wraps round midnight: 22:00, 23:00, 00:00, 01:00, 02:00Write 22-23,0-2
@noon12:00 every dayNo @noon

GitLab pins fugit at 1.11.2, and that version rejects ?, W, the Quartz form 5L, ~ and @reboot. fugit's modulo extension (sun%2, every other Sunday) is accepted, but which weeks it picks depends on the week count of the date library GitLab bundles, so this page does not predict it. The editor in GitLab's UI checks syntax with a different library (cron-validator) than the server (fugit), so the two can disagree about unusual expressions.

Why a schedule runs late, or less often than its cron

GitLab does not start pipelines at the cron time itself. A background job, the pipeline schedule worker, runs on its own cron and queues every schedule that has come due since its last run — so a pipeline can never run more often than the worker, and starts at the worker's next run. Under load, GitLab processes schedules in batches, which can delay them "several minutes to over an hour".

GitLab.com FreeGitLab.com paid tiersSelf-managed default
Schedule worker*/5 * * * **/5 * * * *3-59/10 * * * *
Pipeline schedules per project105010
Pipelines per schedule per day24288set by the administrator

A schedule that asks for more pipelines a day than allowed is slowed to one every 1440 ÷ limit minutes: once an hour on GitLab.com Free. The "Queued (UTC)" column above is the worker's next run after each scheduled time, assuming the worker's cron is read in UTC.

FAQ

Why does my GitLab schedule run on more days than I expected?

When both day of month and day of week are set, GitLab runs when either matches, as in the crontab man page — and unlike Linux cron, a field such as */2 counts as set. Add & after either day field (1-7&) to require both.

Can a GitLab pipeline schedule run every minute?

No. On GitLab.com the schedule worker runs every 5 minutes and the Free tier allows 24 pipelines per schedule per day, so even */5 * * * * is slowed to hourly on Free. Paid tiers allow 288 a day, one every 5 minutes.

Which time zone does a GitLab pipeline schedule use?

Its own Cron timezone, UTC by default. The API takes it as cron_timezone, and accepts tz database names such as America/Los_Angeles. What happens to a run in a skipped or repeated DST hour is not documented; check the dates with the DST checker.

Why is my schedule "Inactive"?

A schedule runs with its owner's permissions. If the owner is blocked or removed from the project, the schedule becomes inactive; a Maintainer or Owner can take ownership to reactivate it.