What is a CRON Expression?
A CRON expression is a string of five fields that defines a schedule for running automated tasks. Originally developed for Unix systems, CRON is now used across all platforms including Linux servers, cloud services like AWS and Google Cloud, CI/CD pipelines, and container orchestration tools like Kubernetes.
Each field represents a time unit: minute (0-59), hour (0-23), day of month (1-31), month (1-12), and day of week (0-6, where 0 is Sunday).
CRON Syntax Quick Reference
| Symbol | Meaning | Example |
|---|---|---|
| * | Any value | * * * * * |
| , | Value list separator | 1,15 * * * * |
| - | Range of values | 0 9-17 * * * |
| / | Step values | */15 * * * * |
| L | Last day of month/week | 0 0 L * * |
| ? | No specific value (day fields) | 0 0 ? * 1 |
Common CRON Expression Examples
0 0 * * *
Every day at midnight
0 9 * * 1-5
Weekdays at 9:00 AM
*/15 * * * *
Every 15 minutes
0 0 1 * *
First day of every month
0 */2 * * *
Every 2 hours
0 0 * * 0
Every Sunday at midnight
30 4 1,15 * *
4:30 AM on 1st and 15th
0 0 L * *
Last day of every month
How to Use This CRON Generator
Build Your Schedule
Use the visual builder tabs to set minute, hour, day, month, and weekday values
Preview Execution Times
See the next scheduled runs and verify your expression works as expected
Copy or Export
Copy the expression or export to crontab, JSON, YAML, or get code snippets
Common Use Cases for CRON Jobs
Database Backups
Schedule automated database backups daily or weekly to prevent data loss
Log Rotation
Automatically archive and clean old log files to manage disk space
Email Reports
Send daily, weekly, or monthly automated reports to stakeholders
Cache Clearing
Periodically clear application caches to ensure fresh data
Health Checks
Monitor services and send alerts when systems are unresponsive
Data Synchronization
Sync data between systems or APIs on a regular schedule
Where Can You Use CRON Expressions?
CRON expressions are supported across virtually all modern platforms and tools. Whether you're scheduling tasks on a Linux server, deploying to the cloud, or automating CI/CD pipelines, the same CRON syntax works everywhere.
Linux & Unix
crontab, systemd timers, anacron
AWS
CloudWatch Events, EventBridge, Lambda
Google Cloud
Cloud Scheduler, Cloud Functions
Azure
Azure Functions, Logic Apps, Automation
Containers
Kubernetes CronJob, Docker, ECS
CI/CD
GitHub Actions, GitLab CI, Jenkins
CRON Libraries by Language
Most programming languages have libraries to parse and execute CRON expressions directly in your application code, without relying on system-level schedulers.
Node.js
node-cron, cron, Croner, Agenda, Bull
Python
APScheduler, Celery, schedule, croniter
Java
Quartz Scheduler, Spring @Scheduled
PHP
Laravel Task Scheduling, cron-expression
Go
robfig/cron, gocron
Ruby
whenever, rufus-scheduler, sidekiq-cron
Frequently Asked Questions
What timezone does CRON use?
By default, CRON uses the system timezone. For cloud services, this is often UTC. Use our timezone selector to preview execution times in different timezones.
What's the difference between * and ?
The asterisk (*) means "every value" while the question mark (?) means "no specific value" and is only used in day-of-month and day-of-week fields to avoid conflicts.
Can I run a CRON job every second?
Standard 5-field CRON only supports minute-level precision. Some systems support a 6-field format with seconds. Enable "seconds field" in our advanced options to build 6-field expressions.
How do I run a job on the last day of the month?
Use the "L" symbol in the day-of-month field. For example, 0 0 L * * runs at midnight on the last day of every month.
How do I schedule a job for every 5 minutes?
Use the step syntax with */5 * * * *. The */5 means "every 5th minute" starting from 0.
How do I run a job only on weekdays?
Set the day-of-week field to 1-5 (Monday through Friday). For example, 0 9 * * 1-5 runs at 9 AM on weekdays.
What's the difference between crontab and CRON?
CRON is the scheduling daemon that runs tasks, while crontab (CRON table) is the file or command used to define and manage scheduled tasks. Use crontab -e to edit your schedule.