Moving crontab schedules to Databricks and EventBridge: what changes in the expression
0 9 * * 1-5 means 09:00 Monday–Friday in a crontab. Paste it into Databricks (Quartz) or AWS EventBridge and it is either rejected or runs on the wrong days. A quick demo with the free DevToolBox Cron Converter : From (Unix) To Result Outcome 0 9 * * 1-5 Quartz 0 0 9 ? * 2-6 conditional (same timezone) 0 9 * * 1-5 EventBridge cron(0 9 ? * 2-6 *) conditional (rules run in UTC) 0 9 1 * 1 Quartz —…
The article examines the differences in scheduling expressions between Unix cron, Databricks (Quartz), and AWS EventBridge. It highlights potential issues when transferring Unix cron schedules to these platforms.
A crontab expression of "0 9 * * 1-5" translates to 09:00 on Monday through Friday using Unix cron. However, when pasted into Databricks (Quartz) or AWS EventBridge, the expression may be rejected or run on incorrect days.
The article explains the syntax of Unix cron by providing a demo with the free DevToolBox Cron Converter. It demonstrates how the converter translates Unix expressions to Quartz and EventBridge cron expressions. The results are labeled as exact, conditional, or unsupported.
The converter handles various aspects of cron expressions, such as the seconds field, ? in one day field, 0 vs 1 for Sunday, L / W / # in the day field, the year field, and the OR rule for day fields. It also notes that not all results are converted accurately.
The article provides examples of how different schedulers handle Daylight Saving Time (DST). For instance, EventBridge skips the hour if it's in the transition period, while cronie (the Unix scheduler) runs the job right after the change and does not run it twice during the affected hour. EventBridge also runs scheduled rules in UTC only, without skipping or repeating hours.
Lastly, the article suggests using single-expression validators such as Quartz or EventBridge to ensure compatibility when migrating cron schedules to these platforms.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.