0
0
Apache Airflowdevops~20 mins

Cron expressions in Airflow - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Airflow Cron Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1: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?
AMonday 2024-06-10 06:00 UTC
BTuesday 2024-06-04 06:00 UTC
CMonday 2024-06-03 06:00 UTC
DSunday 2024-06-02 06:00 UTC
Attempts:
2 left
💡 Hint
Remember that the cron runs at 6 AM on weekdays (Monday to Friday).
🧠 Conceptual
intermediate
1:30remaining
Understanding the meaning of a cron expression
What does the cron expression 30 23 15 * * mean in Airflow scheduling?
ARun at 11:30 AM on the 15th day of every month
BRun at 11:30 PM on the 15th day of every month
CRun every 15 minutes starting at 11:30 PM
DRun at 11:30 PM every day
Attempts:
2 left
💡 Hint
The first two numbers represent minutes and hours.
Troubleshoot
advanced
2: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?
AFebruary never has 31 days, so the schedule never matches
BThe timezone is not set, so the DAG runs at a different time
CAirflow does not support scheduling on specific days of the month
DThe cron expression syntax is invalid and causes an error
Attempts:
2 left
💡 Hint
Check if the date specified actually exists in the calendar.
Best Practice
advanced
1: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?
A0 0 * * *
B0 24 * * *
C0 0 1 * *
D0 0 * * 0
Attempts:
2 left
💡 Hint
Midnight is hour 0, minute 0 every day.
🔀 Workflow
expert
2: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.
A3,1,2,4
B2,1,3,4
C1,3,2,4
D1,2,3,4
Attempts:
2 left
💡 Hint
Think about editing first, then testing, then deploying, then verifying.