Common Cron Job Errors Explained: Four Scheduling Traps in Five Fields
Cron, a 50-year-old scheduling tool with five time fields, remains a common source of unexpected job execution times. One trap occurs when both day-of-month and day-of-week fields are restricted, causing the job to run on either condition rather than both simultaneously. Using '*/2' in the day-of-month field does not mean 'every two days' but instead creates irregular intervals that can drift across month boundaries. Timezone confusion, especially in containers or platforms like GitHub Actions, can shift execution times unless explicitly set. Additionally, the percent symbol (%) in crontab files terminates commands and must be escaped, unlike in Kubernetes or GitHub Actions workflows.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in