Generate Cron Expressions Instantly

Build & Understand Cron Jobs Easily

0 0 * * *

📋 Explanation:

This cron expression will run at 12:00 AM (midnight) every day.

💡 Common Examples:

0 9 * * 1-5
Every weekday at 9:00 AM
0 0 1 * *
First day of every month at midnight
*/15 * * * *
Every 15 minutes
0 */2 * * *
Every 2 hours
0 0 * * 0
Every Sunday at midnight

📖 Cron Expression Reference:

Field Allowed Values Special Characters
Minute 0-59 * , - /
Hour 0-23 * , - /
Day of Month 1-31 * , - /
Month 1-12 * , - /
Day of Week 0-6 (0=Sunday) * , - /

Special Characters:

  • * - Any value (wildcard)
  • , - Value list separator (e.g., 1,3,5)
  • - - Range of values (e.g., 1-5)
  • / - Step values (e.g., */5 means every 5)

Most Popular Cron Expressions

Every Minute/Hour:

  • * * * * * - Every minute
  • 0 * * * * - Every hour (at minute 0)
  • */5 * * * * - Every 5 minutes
  • */15 * * * * - Every 15 minutes
  • */30 * * * * - Every 30 minutes
  • 0 */2 * * * - Every 2 hours
  • 0 */6 * * * - Every 6 hours

Daily Schedules:

  • 0 0 * * * - Daily at midnight
  • 0 9 * * * - Daily at 9:00 AM
  • 0 12 * * * - Daily at noon
  • 0 18 * * * - Daily at 6:00 PM
  • 30 2 * * * - Daily at 2:30 AM
  • 0 6 * * * - Daily at 6:00 AM

Weekly Schedules:

  • 0 9 * * 1 - Every Monday at 9:00 AM
  • 0 0 * * 0 - Every Sunday at midnight
  • 0 9 * * 1-5 - Weekdays at 9:00 AM
  • 0 18 * * 5 - Every Friday at 6:00 PM
  • 0 0 * * 6 - Every Saturday at midnight

Monthly/Yearly:

  • 0 0 1 * * - First day of every month at midnight
  • 0 9 1 * * - First day of every month at 9:00 AM
  • 0 0 15 * * - 15th of every month at midnight
  • 0 0 1 1 * - January 1st at midnight (New Year)
  • 0 0 * * 0 - Every Sunday at midnight

Backup & Maintenance:

  • 0 2 * * * - Daily at 2:00 AM (common backup time)
  • 0 3 * * 0 - Weekly backup (Sunday 3:00 AM)
  • 0 1 1 * * - Monthly backup (1st day, 1:00 AM)
  • 30 3 * * * - Daily maintenance at 3:30 AM
  • 0 4 * * 6 - Weekly maintenance (Saturday 4:00 AM)

Business Hours:

  • 0 9-17 * * 1-5 - Every hour during business hours (9 AM - 5 PM, weekdays)
  • */30 9-17 * * 1-5 - Every 30 minutes during business hours
  • 0 9,17 * * 1-5 - Start and end of business day

Log Rotation & Cleanup:

  • 0 0 * * * - Daily log rotation
  • 59 23 * * * - End of day cleanup
  • 0 1 * * 0 - Weekly cleanup (Sunday 1:00 AM)

Frequently Asked Questions

Use */5 * * * *. The */5 in the minute field means "every 5 minutes". This will execute at 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, and 55 minutes past every hour.

Use 0 2 * * *. This runs at exactly 2:00 AM every day. The first 0 sets the minute to 0, the 2 sets the hour to 2 AM, and the three * symbols mean every day, every month, and every day of the week.

Use 0 9 * * 1-5 (for 9 AM on weekdays). The 1-5 represents Monday through Friday. Sunday is 0, Monday is 1, Tuesday is 2, etc. You can change the hour and minute as needed.

Use 0 9 * * 1 for every Monday at 9:00 AM. The 1 in the last field represents Monday. Change the hour (9) and minute (0) to your preferred time.

Use */15 * * * *. This executes at 0, 15, 30, and 45 minutes past every hour, every day.

Use 0 0 * * *. The first 0 is minute 0, the second 0 is hour 0 (midnight), and the three * mean every day, every month, and every day of the week.

This means "every minute of every hour of every day" - essentially running every single minute. Be careful with this as it can overwhelm your system.

Use 0 * * * *. This runs at the top of every hour (1:00, 2:00, 3:00, etc.) every day.

To add a cronjob in ServerAvatar: 1) Login to your ServerAvatar dashboard, 2) Select your server, 3) Navigate to the 'Cronjobs' section, 4) Click 'Create Cronjob', 5) Enter your cron expression and command, 6) Save the cronjob. For detailed step-by-step instructions, visit the complete guide at https://serveravatar.com/docs/server/create-a-cronjob

Ready to Transform Your Hosting?

Join 1,000+ developers who’ve simplified server management with ServerAvatar. Get started for free and deploy your first server and application in minutes.
  • No Credit Card Required
  • Free $10 Server Credits
  • Deploy in next 10 minutes!