# What is a cron expression? A cron expression is five fields, minute, hour, day of month, month and day of week, that name when a scheduled command runs. `30 6 * * 1-5` reads as minute 30, hour 6, any day of the month, any month, Monday to Friday: 06:30 on weekdays. The format comes from the Unix `cron` daemon. Schedulers that never touch a Unix server, such as CI services, cloud schedulers and Runtime's jobs, use it too. **On Runtime (withruntime.com), a job takes a five-field cron expression and an IANA time zone, and starts a fresh machine at each time it names.** The job's `nextRunAt` shows the next time as Runtime reads the expression. Read it after you create a job, before anything depends on the schedule. ## The five fields | Field | Allowed values | Example | Means | | ------------ | ------------------------------ | ------- | ------------------------- | | Minute | 0 to 59 | `30` | At minute 30 | | Hour | 0 to 23 | `6` | At 06:00 to 06:59 | | Day of month | 1 to 31 | `1,15` | On the 1st and the 15th | | Month | 1 to 12 | `*` | Every month | | Day of week | 0 to 7, where 0 and 7 are Sunday | `1-5` | Monday to Friday | Each field also takes four forms: - `*` matches every value of the field. - `a-b` is a range, both ends included. `9-17` in the hour field is 09:00 to 17:59. - `a,b,c` is a list. Lists and ranges can mix: `0-4,8-12`. - `*/n` or `a-b/n` is a step: every nth value, counted from the start of the range. `*/15` in the minute field is :00, :15, :30 and :45. ## Common expressions | Expression | When it runs | | ------------------- | --------------------------------------------------- | | `* * * * *` | Every minute | | `*/5 * * * *` | Every five minutes | | `0 * * * *` | At the start of every hour | | `0 3 * * *` | Every day at 03:00 | | `30 6 * * 1-5` | Weekdays at 06:30 | | `*/15 9-17 * * 1-5` | Every 15 minutes from 09:00 to 17:45, on weekdays | | `0 9 * * 1` | Mondays at 09:00 | | `0 0 1 * *` | Midnight on the first day of each month | | `0 0 1 1 *` | Midnight on 1 January | | `30 4 1,15 * 5` | 04:30 on the 1st, the 15th, and every Friday | Many cron implementations also accept nicknames such as `@daily` (`0 0 * * *`) and `@hourly` (`0 * * * *`), and three-letter names such as `mon` and `jan`. Not every scheduler does. Runtime's jobs take numbers: write `1-5`, not `mon-fri`. ## Rules that surprise people - **Day of month and day of week are joined by OR.** When both fields are restricted, the command runs when either one matches. `30 4 1,15 * 5` runs on the 1st, the 15th and every Friday, not only on a Friday that falls on the 1st or the 15th. - **A step restarts with each hour or day.** `*/7` in the minute field runs at :00, :07 and on to :56, then at :00 again four minutes later. For an exact interval that does not divide 60, schedule more often and let the command decide. - **The time zone is the scheduler's, not yours.** Classic `cron` reads the server's clock, and many hosted schedulers read UTC. A job at `0 9 * * *` in UTC runs at 09:00 London time in winter and at 10:00 in summer. A scheduler that takes a time zone, as Runtime's jobs do, keeps 09:00 local time all year. - **Times that do not exist.** In a time zone with daylight saving, 02:30 is skipped on the night the clocks go forward in many places. Avoid scheduling between 01:00 and 03:00 local time if a skipped or doubled run matters. ## Check an expression before you rely on it ```ts import { Runtime } from "withruntime"; const runtime = new Runtime(); // Each expression's next time, as Runtime reads it, before anything depends on it. for (const cron of ["*/15 9-17 * * 1-5", "0 0 1 * *", "30 4 1,15 * 5"]) { const job = await runtime.jobs.create({ name: `cron-check-${Date.now()}`, schedule: { cron, timezone: "America/Chicago" }, command: ["true"], }); console.log(cron.padEnd(18), new Date(job.nextRunAt!).toISOString()); await runtime.jobs.cancel(job.id); // only the next time was wanted } ``` A job made this way never runs: it is cancelled before its first time comes. ## Related - [How to run a cron job in the cloud](/how-to/run-a-cron-job-in-the-cloud), with retries and a time zone. - [Scheduled AI agents](/blog/scheduled-ai-agents), a nightly agent on a cron schedule. - [What is idle pause?](/glossary/idle-pause), the other way to pay nothing between bursts of work. - [Jobs](/docs/jobs) in the guides. ## Sources - [crontab(5), Linux manual page](https://man7.org/linux/man-pages/man5/crontab.5.html), checked 17 November 2026 Facts on this page were checked on 17 November 2026.