Challenge - 5 Problems
Airflow Cron Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the next execution time for this cron expression?
Given the cron expression
0 6 * * 1-5 in Airflow, what is the next scheduled run time if the current time is Monday 2024-06-03 05:00 UTC?Attempts:
2 left
💡 Hint
Remember that the cron runs at 6 AM on weekdays (Monday to Friday).
✗ Incorrect
The cron expression means run at 6:00 AM on Monday through Friday. Since current time is Monday 5 AM, the next run is the same day at 6 AM.
🧠 Conceptual
intermediate1:30remaining
Understanding the meaning of a cron expression
What does the cron expression
30 23 15 * * mean in Airflow scheduling?Attempts:
2 left
💡 Hint
The first two numbers represent minutes and hours.
✗ Incorrect
The cron fields are: minute=30, hour=23, day=15, month=any, weekday=any. So it runs once a month at 23:30 on day 15.
❓ Troubleshoot
advanced2:00remaining
Why does this Airflow DAG not run as expected?
An Airflow DAG has the cron schedule
0 0 31 2 *. It never runs. Why?Attempts:
2 left
💡 Hint
Check if the date specified actually exists in the calendar.
✗ Incorrect
February has at most 29 days, so day 31 never occurs. The DAG never triggers.
✅ Best Practice
advanced1:30remaining
Choosing a cron expression for daily midnight runs
Which cron expression is the best choice to schedule an Airflow DAG to run daily at midnight UTC?
Attempts:
2 left
💡 Hint
Midnight is hour 0, minute 0 every day.
✗ Incorrect
The expression '0 0 * * *' means every day at 00:00. Option A is invalid (hour 24), C runs only on the first day of the month, D runs only on Sundays.
🔀 Workflow
expert2:30remaining
Order the steps to update an Airflow DAG's schedule using a cron expression
Put these steps in the correct order to update an Airflow DAG's schedule with a new cron expression.
Attempts:
2 left
💡 Hint
Think about editing first, then testing, then deploying, then verifying.
✗ Incorrect
First edit the schedule in code, then test it, then deploy to Airflow, finally check the UI.