Cron Expressions Explained: Stop Guessing, Start Scheduling
I once wrote a cron expression that was supposed to run a database backup every Sunday at 3 AM. What it actually did was run every minute of every hour on every Sunday. The backup script ran 1,440 ...

Source: DEV Community
I once wrote a cron expression that was supposed to run a database backup every Sunday at 3 AM. What it actually did was run every minute of every hour on every Sunday. The backup script ran 1,440 times every Sunday for three weeks before someone noticed the disk was filling up with redundant backup files. The expression was * * * * 0 when it should have been 0 3 * * 0. One wrong field, and a weekly task becomes a one-per-minute task. Cron syntax is one of those things that most developers use regularly but few have actually memorized. We look it up, copy an expression from Stack Overflow, tweak it, and hope it's right. That approach works until it doesn't, and when cron goes wrong, it tends to go wrong quietly. The five fields A standard cron expression has five fields, left to right: minute hour day-of-month month day-of-week 0 3 * * 0 Each field accepts: A specific value: 5 means the fifth minute, or the fifth month (May) A wildcard: * means every possible value A range: 1-5 means o