Interview Questions/Phone Screen/Cron Expression Basics
BeginnerPhone
2 min

Cron Expression Basics

LinuxAutomationScheduling
Advertisement
Interview Question

What does the cron expression "0 2 * * 1-5" mean, and how would you test a cron job locally?

Key Points to Cover
  • "0 2 * * 1-5" runs at 02:00 Monday–Friday
  • Fields: min hour dom month dow
  • Test via `crontab -l`, `cron` logs, or run the script directly with a dry run flag
Evaluation Rubric
Parses cron fields correctly40% weight
Explains the schedule accurately30% weight
Mentions safe testing approaches30% weight
Hints
  • 💡Remember DOW ranges and local time considerations.
Potential Follow-up Questions
  • How do you ensure idempotency?
  • What about timezone handling in cron?
Advertisement