Databricks Data Engineer Associate Question 443
Single answerYou are tasked with scheduling a Databricks job to process a batch of data every weekday at 9:00 AM. Which scheduling configuration using CRON syntax should you use?
- A
0 9 * * 1-5
- B
0 21 * * 1-5
- C
0 9 * * 0
- D
0 9 * * *
Show answer and explanation
Correct answer: A
Explanation
The correct CRON syntax to schedule a Databricks job for 9:00 AM on weekdays uses '0 9 * * 1-5'. The fields correspond to minute, hour, day of the month, month, and day of the week, respectively. The '1-5' in the day-of-week field specifies Monday through Friday, fulfilling the requirement.
- A. Correct.
This CRON expression schedules the job to run at 9:00 AM (0 9) on every weekday (1-5 for Monday to Friday). This is the correct option for the requirement.
- B. Incorrect.
This CRON expression schedules the job at 9:00 PM (21 in 24-hour format) on weekdays. This is incorrect because the requirement is for 9:00 AM.
- C. Incorrect.
This CRON expression schedules the job at 9:00 AM on Sundays (0 in the day-of-week field). This is incorrect because the requirement is to run on weekdays only.
- D. Incorrect.
This CRON expression schedules the job to run at 9:00 AM every day of the week, including weekends. This is incorrect because the requirement is to run only on weekdays.