The first time someone sees 0 9 * * 1, it looks like a password, a math puzzle, or a typo that survived code review. Then a teammate says, "That runs every Monday at 9," and the symbols suddenly become a schedule.
Cron expressions are short because they were designed for machines and system administrators, not for casual reading. They are still everywhere: server backups, email digests, billing jobs, report exports, cleanup scripts, monitoring checks, and scheduled CI tasks. BlinkCalc's Cron Expression Generator helps turn a human schedule into a five-field expression, but it is worth understanding the fields before you let a job run unattended.
Cron implementations can vary. This guide focuses on the common five-field Unix-style format. Some platforms add seconds, years, special characters, or different day-of-week rules. Always check the scheduler you are using.
What cron is used for
Cron is a scheduling system for running commands at set times. On Unix-like servers, a crontab file can tell the system to run a script every night, every hour, every weekday morning, or on the first day of each month.
The idea has spread beyond traditional servers. Cloud schedulers, build systems, deployment platforms, queue workers, and app frameworks often use cron-like expressions. Even when the underlying system is not classic cron, the syntax is familiar enough that teams reuse it.
Scheduled jobs are useful for work that should happen without a person clicking a button: rotating logs, sending reminders, syncing inventory, clearing expired sessions, creating database snapshots, or refreshing cached content.
The five common cron fields
A standard cron expression has five fields:
minute hour day-of-month month day-of-week
Each field narrows when the job is allowed to run. The expression 0 9 * * 1 means minute 0, hour 9, any day of month, any month, and day of week 1. In many systems, day 1 means Monday. Read together, that is Monday at 09:00.
The order matters. A common beginner mistake is reading the first field as hour. It is minute. Another mistake is assuming the expression includes a time zone. It usually does not. The scheduler decides which clock is being used.
Minute
The minute field accepts values from 0 to 59. 0 means exactly at the top of the hour. 30 means half past. */15 means every 15 minutes, such as 00, 15, 30, and 45.
Examples:
| Minute field | Meaning |
|---|---|
0 | at minute 0 |
5 | at minute 5 |
*/10 | every 10 minutes |
15,45 | at minutes 15 and 45 |
Minute-level scheduling is common. Standard cron does not run every second. If you see six-field expressions with seconds, that is a platform extension, not the five-field format.
Hour
The hour field usually accepts 0 to 23. It uses a 24-hour clock. 9 means 09:00. 17 means 17:00 or 5 PM. 0 means midnight.
The expression 0 2 * * * runs at 02:00 every day, using the scheduler's time zone. That can be a good time for maintenance, but only if 02:00 is quiet for your users. For global products, one region's quiet time may be another region's workday.
Use the Time Converter when you need to translate a schedule for teammates in different regions. Write the intended time zone in documentation beside the cron expression.
Day of month and month
The day-of-month field usually accepts 1 to 31. The month field accepts 1 to 12, and some systems also accept names such as JAN or MON. 0 8 1 * * runs at 08:00 on the first day of every month.
Calendar edges matter. A job scheduled for the 31st will not run in months with only 30 days, and February complicates schedules further. If a billing or reporting workflow needs "last day of the month," check whether your scheduler supports that directly. Standard five-field cron does not express every calendar idea cleanly.
The Date Difference Calculator can help when planning reporting windows, retention periods, or trial reminders around dates rather than fixed intervals.
Day of week
The day-of-week field represents weekdays. In many cron systems, 0 or 7 means Sunday, 1 means Monday, and 6 means Saturday. Some platforms differ or support names such as SUN, MON, and TUE.
Examples:
| Day field | Meaning in many systems |
|---|---|
* | every day |
1 | Monday |
1-5 | Monday through Friday |
0,6 | Sunday and Saturday |
Because weekday numbering varies in human memory, names can be clearer where supported. If the platform accepts MON, it may be easier to review than 1.
Wildcards, steps, ranges, and lists
The wildcard * means every allowed value. In the month field, * means every month. In the hour field, * means every hour.
A step uses slash notation. */5 means every five allowed values. In the minute field, that is every five minutes. In the hour field, it is every five hours.
A range uses a hyphen. 9-17 means values from 9 through 17. A list uses commas. 1,3,5 means values 1, 3, and 5. These can combine in some systems, but readability drops quickly. If a schedule is too clever to review, it is too clever for a production job without comments.
Common schedule examples
Here are practical five-field examples:
| Schedule | Cron expression |
|---|---|
| Every hour | 0 * * * * |
| Every day at 09:00 | 0 9 * * * |
| Every 15 minutes | */15 * * * * |
| Every Monday at 09:00 | 0 9 * * 1 |
| Weekdays at 18:30 | 30 18 * * 1-5 |
| First day of the month at 02:00 | 0 2 1 * * |
Treat examples as starting points, not proof of compatibility. A cloud scheduler may ask for six fields. A CI platform may use UTC. A hosted app may interpret day names differently. Read the local documentation before scheduling anything important.
Time zones and server time
Cron problems often come from time zones rather than syntax. A developer writes a job for 8 AM, the server runs on UTC, and the report arrives before anyone is awake. Daylight saving time can also shift expectations for jobs tied to local business hours.
There are three clocks to consider: your local time, the server or scheduler time, and the user's expected time. They are not always the same. If a platform lets you set a time zone, document it. If it does not, assume server time or UTC only after checking.
The Timestamp Converter helps when logs record run times as Unix timestamps. Convert the timestamp, then compare it with the cron expression and the scheduler time zone.
A worked example
Suppose a team wants a script to send a weekly stock report at 07:30 every Tuesday. The intended schedule is:
minute: 30
hour: 7
day of month: any
month: any
day of week: Tuesday
In many five-field cron systems, Tuesday is 2, so the expression is:
30 7 * * 2
Before deploying, the team should answer a few questions. Is the scheduler using UTC or local office time? Does day 2 mean Tuesday on this platform? What happens if the report command fails? Are logs and alerts in place? Cron syntax starts the conversation; reliable scheduling needs operational checks too.
How to use the Cron Expression Generator
Open the Cron Expression Generator, choose the schedule you want, and review the expression it creates. Read the plain-English explanation beside the expression. If the explanation does not match your intent, adjust the fields before copying.
For custom schedules, work left to right. Set the minute, then the hour, then decide whether the job is tied to a calendar day or weekday. Keep a note beside the expression in your crontab or configuration. Future maintainers should not have to decode 15 4 3,17 * 1-5 under pressure.
After deployment, monitor the first few runs. A cron expression can be syntactically correct and still run at a bad time, run in the wrong environment, or fail because the command path is different under cron.
Cron jobs need more than a schedule
A cron expression only answers when. Production automation also needs to answer what, where, how long, and what happens if it fails. The command should use full paths where needed. The script should write logs. Long-running jobs should avoid overlapping if a previous run is still active.
For example, a backup scheduled every hour may be fine while it finishes in five minutes. If the database grows and the backup starts taking 70 minutes, the next run can begin before the previous one ends. That can create load spikes or corrupt outputs if the script is not designed for locking.
Good scheduled jobs usually have a few supporting pieces: clear logs, alerts on failure, idempotent behavior where possible, safe retries, and documented ownership. Cron can launch the job, but it will not automatically make the job reliable.
Naming and documenting schedules
Cron expressions are compact, so comments carry real value. A crontab entry like this is easier to maintain:
# Send weekly inventory report, Tuesday 07:30 Europe/London
30 7 * * 2 /srv/reports/send-inventory-report.sh
The comment states the purpose and intended time zone. If the server later moves to UTC, the mismatch becomes visible. If the report owner changes, the command name gives the next maintainer a clue.
For application config, use descriptive variable names. WEEKLY_REPORT_CRON=30 7 * * 2 is better than CRON_1. The future debugging session will probably happen while something is late, missing, or duplicated. Names reduce panic.
Business schedules vs interval schedules
Some schedules are calendar-based: every Monday, first day of the month, weekdays at 18:00. Others are interval-based: every 10 minutes, every hour, every six hours. The difference matters.
An interval job does not care about business meaning. It checks a queue, refreshes a cache, or polls an API. A calendar job often has human expectations around reports, invoices, payroll, or reminders. Calendar jobs deserve more attention to holidays, weekends, time zones, and daylight saving changes.
If a job must run "two business days before month end," plain five-field cron may not be enough. Use application logic, a scheduler with calendar support, or a workflow tool that understands business rules.
Checking logs after the first run
The first successful scheduled run is worth watching. Check the scheduler log, the script log, and the output destination. A job can start on time and still fail halfway through. It can also finish successfully while writing the file to the wrong folder or sending the report to the wrong list.
Record the expected next run time. If the job is meant to run every Monday at 09:00, write down the next Monday date and time in the relevant time zone. That small note helps you catch off-by-one weekday mistakes before stakeholders notice.
For jobs that affect money, customer communication, data deletion, or backups, add alerting before relying on the schedule. Silent cron failures are common because the system did exactly what it was told: it ran a command, then discarded output nobody configured.
For data jobs, also check row counts or output checksums after the run. A schedule can fire correctly while the upstream export is empty, delayed, or permission-blocked. The calendar says the job ran; the business still needs the result to be complete.
Common mistakes
One mistake is confusing minute and hour. 9 0 * * * runs at 00:09, not 09:00. 0 9 * * * is the 09:00 version.
Another mistake is ignoring environment variables. Cron often runs with a smaller environment than your terminal. A script that works manually may fail because paths, credentials, or language runtimes are missing.
A third mistake is assuming local time. Many hosted schedulers use UTC by default. If a job is business-hour sensitive, write the time zone near the expression.
A fourth mistake is using both day-of-month and day-of-week without checking how the scheduler combines them. Some systems treat the match differently than beginners expect.
A fifth mistake is scheduling heavy jobs at the same obvious time as everyone else, such as exactly midnight. A slight offset like 00:07 can reduce load collisions.
FAQ
What does a cron expression do?
It describes when a scheduled job should run. In the common five-field format, the fields represent minute, hour, day of month, month, and day of week.
What does 0 9 * * 1 mean?
In many standard cron systems, it means run at 09:00 every Monday. Confirm day-of-week numbering and time zone in your scheduler.
Does cron use local time or UTC?
That depends on the system running the job. Traditional server cron often uses the server's configured time zone. Many cloud schedulers use UTC unless configured otherwise.
Can cron run every 15 minutes?
Yes, a common five-field expression is */15 * * * *. That means every 15 minutes within every hour.
Why did my cron job not run?
Common causes include wrong time zone, invalid expression, command path problems, missing environment variables, permissions, disabled scheduler, or a script that fails silently.
Are all cron expressions compatible everywhere?
No. Some systems use five fields, others add seconds or years, and some support special characters that others reject. Always check the target platform.