A reporting DAG must run only on working days, skipping weekends and a list of national holidays that the business maintains in a table. Which setup accomplishes this?
Show answer and explanation
Answer: A
A cron expression with a weekday field, such as 0 6 * * 1-5, limits scheduled runs to Monday through Friday. A ShortCircuitOperator, or a branch operator, can then compare the logical date with the maintained holiday table and skip downstream work on those days. The combination handles both rules in reviewable code. A daily schedule runs every day, a 24-hour interval ignores calendars, and tags do not affect execution.
Why the other options are wrong
- B. Daily runs fire seven days a week. Relying on people to trigger holiday skips is manual and error-prone, and it is not scheduling at all.
- C. A fixed 24-hour interval keeps firing on weekends and holidays, because it counts only elapsed time. Calendar awareness is not part of that setting.
- D. Every day still produces a run, so weekend work executes. Tags are labels for search and reporting and have no effect on whether a task runs.