Cron expression explainer
Paste a cron expression to see what it means in plain English and the next 10 times it runs in your time zone. Everything runs in your browser.
Get alerted if this job misses a run
Cron doesn't tell anyone when a job stops running. A Pingstack heartbeat check expects this schedule in the time zone you pick. Your job calls a ping URL when it finishes, and if the call doesn't arrive on time plus a grace period, you get an alert by email, Slack or webhook.
How to read a cron expression
A standard cron expression has five fields separated by spaces. Each field says which values of that part of the clock the job runs on. The job runs at every minute where all five fields match.
| Position | Field | Allowed values |
|---|---|---|
| 1 | Minute | 0 to 59 |
| 2 | Hour | 0 to 23 |
| 3 | Day of month | 1 to 31, or L for the last day |
| 4 | Month | 1 to 12, or JAN to DEC |
| 5 | Day of week | 0 to 7 (0 and 7 are Sunday), or SUN to SAT |
Special characters
| Symbol | Meaning | Example |
|---|---|---|
* | Every value | * in the hour field runs every hour |
, | A list | 0,30 in the minute field runs at :00 and :30 |
- | A range | 1-5 in the day of week field is Monday through Friday |
/ | A step | */10 in the minute field runs every 10 minutes |
L | Last day of the month | L in the day of month field |
# | Nth weekday of the month | FRI#2 is the second Friday |
L and # aren't supported by every cron. Vixie cron, the default on most Linux servers, doesn't accept them. Many schedulers also accept macros such as @hourly,@daily, @weekly, @monthly and@yearly.
Common cron expressions
*/15 * * * *every 15 minutes0 * * * *every hour0 3 * * *every day at 03:0030 9 * * 1-5weekdays at 09:300 0 * * 0every sunday at midnight0 0 1 * *first day of every month0 0 L * *last day of every month0 9 * * MON#1first monday of the month at 09:00
Mistakes that make a cron job run at the wrong time
Setting both day fields
If you restrict both the day of month and the day of week,0 0 1 * 1 runs on the 1st of the month andon every Monday. It doesn't mean "the 1st, if it's a Monday". The explainer flags this when it sees it.
Leaving the minute as *
* 9 * * * runs 60 times, once a minute from 09:00 to 09:59. For once a day at 09:00, use 0 9 * * *.
Assuming the wrong time zone
Cron uses the server's local time zone unless your cron supports and sets CRON_TZ. Cloud schedulers (GitHub Actions, Vercel, and Kubernetes CronJobs without a timeZone) usually run in UTC. Local times also shift with daylight saving, and a job scheduled in the hour that's skipped or repeated may run late, twice or not at all, depending on the scheduler. Run date on the server if you're not sure, or schedule in UTC.
Using a day that some months don't have
0 0 31 * * only runs in months with 31 days. UseL where your scheduler supports it, or run on the 1st.
Know when a scheduled job stops running
The schedule only tells you when a job should run. To find out when it didn't, have the job call a URL when it finishes and alert when that call is late. In Pingstack this is a heartbeat check with a cron schedule and a time zone. Seeschedules and time zones in the docs, or the crontab recipe for a wrapper script that only reports success.