opyebCronPulse

Cron migration checklist: twelve checks before you move a schedule

Operations · 6 min read

One-line answer: What to verify when moving a crontab to a cloud scheduler or a calendar, in the order that catches real incidents.

Changing schedulers looks like copying a string, but the time zone, field order, interpretation rules and failure handling all change underneath. Work through these checks and most incidents never happen.

Twelve checks before you move

  1. Compare the field count and order of the source and target schedulers.
  2. Check the weekday numbering: 0 = Sunday or 1 = Sunday?
  3. Find every expression that restricts both day-of-month and weekday (OR versus AND).
  4. Confirm whether the time zone is explicit and what the default is.
  5. Decide what should happen on daylight saving transition days.
  6. Check whether seconds or a year field are supported.
  7. Check support for L, W, # and ?.
  8. Choose the concurrency policy: allow, forbid or replace.
  9. Set the allowed lateness for a missed schedule.
  10. Move retry behaviour and notification paths.
  11. Make sure logs and monitoring can see the new scheduler's execution IDs.
  12. Write a rollback plan and a period where double execution is prevented.
source      0 9 * * 1-5
Quartz      0 0 9 ? * MON-FRI
EventBridge 0 9 ? * MON-FRI *
AspectSource crontabTarget Quartz
Field count56 (with seconds)
Weekday numbering0 = Sunday1 = Sunday
Day and weekdayORone only, the other is ?
Default zoneserver localscheduler setting

Compare the expansions

Before and after the move, print the occurrence times for the same period side by side. Three months at minimum, twelve if possible, including the end of February, a leap year, year-end and any DST transitions. Those dates expose boundary bugs. CronPulse's next-run list and multi-zone table make a convenient comparison sheet.

Run both for a while

A safe migration keeps both schedulers active, with only one of them doing real work, guarded by a lock or a flag. Compare the occurrence times, then switch off the old one. Idempotency keys are mandatory during this period.

Document the schedule

If schedules live in code, record the expression, time zone, owner, upstream and downstream dependencies, failure behaviour and last verification date next to it. Someone should be able to explain why a job runs at 04:17.

Finish small

Migrate one small job first. Watch its run times and results for a week before moving the next. Moving everything at once produces duplicate and missing runs whose cause is hard to untangle.

Paste an expression and see its next run times right away.

Open CronPulse

Frequently asked questions

Can I just copy a crontab into a cloud scheduler?

The syntax may look identical while the default time zone, weekday numbering, day/weekday OR rule and seconds support differ. Always compare the expanded run times after copying.

I see duplicate runs after the migration. What first?

Check whether both schedulers are still active, whether retry policies overlap, and whether the date is a DST repeated hour. Apply an idempotency key first to stop the damage.

Sources

Related reading