Cloud DevOps Hub

I’m not talking about the coding part, but cron expressions always confused me!
πŸ˜… If you’ve been there too, don’t worryβ€”you don’t have to! πŸ™Œ

Cron Expression Format:
A cron expression follows this structure:
πŸ•’ * * * * * β†’ Minute Hour Day Month DayOfWeek

πŸ”Ή Minute (0-59)
πŸ”Ή Hour (0-23)
πŸ”Ή Day of Month (1-31)
πŸ”Ή Month (1-12 or JAN-DEC)
πŸ”Ή Day of Week (0-6 or SUN-SAT, where 0 = Sunday)

Common Cron Expressions:
βœ… Every minute β†’ * * * * *
βœ… Every 5 minutes β†’ */5 * * * *
βœ… Every hour β†’ 0 * * * *
βœ… Every day at midnight β†’ 0 0 * * *
βœ… Every Monday at 8 AM β†’ 0 8 * * 1
βœ… Every 1st of the month at 12 AM β†’ 0 0 1 * *

Less Common but Super Useful:
πŸ”Ή Every 5 minutes between 9 AM - 5 PM β†’ */5 9-17 * * *
πŸ”Ή Every 3rd Monday at 7 AM β†’ 0 7 * * 1#3
πŸ”Ή Last day of the month at 11 PM β†’ 0 23 L * *
πŸ”Ή Every leap year on Feb 29 at midnight β†’ 0 0 29 2 *

Now, cron expressions don’t have to be confusing! πŸš€ Found this useful? Repost & share with your network! πŸ‘

#CronJobs #DevOps #CloudComputing #Automation #TechTips #Linux #SRE

8 months ago | [YT] | 3