A data engineer wants to schedule a Databricks Job to run every Tuesday at 8:30 AM UTC. Which cron expression correctly represents this schedule?
Trap 1: 30 8 * * 2
Standard Linux crontab syntax uses 5 fields, but Databricks uses Quartz cron syntax which typically requires 6 or 7 fields including seconds. Standard 5-field expressions will cause validation errors when saving the job schedule.
Trap 2: 8 30 ? * 2 *
Placing 8 in the minute field and 30 in the hour field configures the job to run at 30 minutes past 8 AM incorrectly reversed. This would schedule the execution for 30 AM which is invalid and fails syntax validation.
Trap 3: 0 30 8 * * TUE
Adding an extra leading zero for seconds alongside specifying minute 30 and hour 8 results in a mismatch for standard Quartz cron field counts or triggers every second depending on parser interpretation, invalidating the schedule.
- A
30 8 ? * TUE *
This Quartz cron expression specifies minute 30, hour 8, any day of the month, any month, and Tuesday (TUE) as the day of the week. The question mark handles the constraint where day of month and day of week cannot both be specified.
- B
30 8 * * 2
Why it fails: Standard Linux crontab syntax uses 5 fields, but Databricks uses Quartz cron syntax which typically requires 6 or 7 fields including seconds. Standard 5-field expressions will cause validation errors when saving the job schedule.
- C
8 30 ? * 2 *
Why it fails: Placing 8 in the minute field and 30 in the hour field configures the job to run at 30 minutes past 8 AM incorrectly reversed. This would schedule the execution for 30 AM which is invalid and fails syntax validation.
- D
0 30 8 * * TUE
Why it fails: Adding an extra leading zero for seconds alongside specifying minute 30 and hour 8 results in a mismatch for standard Quartz cron field counts or triggers every second depending on parser interpretation, invalidating the schedule.