0
0
Apache Airflowdevops

Cron expressions in Airflow - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a cron expression in Airflow?
A cron expression in Airflow is a string that defines the schedule for running a task. It uses five fields to specify minute, hour, day of month, month, and day of week.
Click to reveal answer
beginner
What does the cron expression '0 12 * * *' mean in Airflow?
It means the task runs every day at 12:00 PM (noon). The fields are: minute=0, hour=12, day of month=any, month=any, day of week=any.
Click to reveal answer
intermediate
How do you schedule a task to run every Monday at 8 AM using a cron expression in Airflow?
Use the cron expression '0 8 * * 1'. This means minute=0, hour=8, any day of month, any month, and day of week=1 (Monday).
Click to reveal answer
beginner
What does the '*' symbol mean in a cron expression?
The '*' symbol means 'every' possible value for that field. For example, '*' in the month field means every month.
Click to reveal answer
intermediate
How can you run a task every 15 minutes using a cron expression in Airflow?
Use '*/15 * * * *'. The '*/15' in the minute field means every 15 minutes, and the other fields are set to run every hour, day, month, and day of week.
Click to reveal answer
What does the cron expression '30 6 * * *' schedule in Airflow?
ARuns at 6:30 AM every day
BRuns at 6:00 AM every 30 days
CRuns every 30 minutes starting at 6 AM
DRuns at 6:30 PM every day
Which cron expression runs a task every Sunday at midnight in Airflow?
A0 0 * * 0
B0 0 * * 7
C0 0 * * 1
D0 0 7 * *
What does the cron expression '15 14 1 * *' do in Airflow?
ARuns every day at 2:15 PM
BRuns at 1:14 PM every day
CRuns every 15 minutes starting at 2 PM
DRuns at 2:15 PM on the first day of every month
How do you express 'every hour' in a cron expression for Airflow?
A* * * * *
B* 0 * * *
C0 * * * *
D0 0 * * *
Which part of the cron expression controls the day of the week in Airflow?
AFifth field
BSecond field
CFirst field
DThird field
Explain how to read a cron expression in Airflow and give an example.
Think of each field as a time unit that controls when the task runs.
You got /7 concepts.
    Describe how to schedule a task to run every weekday at 9 AM using a cron expression in Airflow.
    Weekdays are Monday to Friday, which are days 1 to 5.
    You got /5 concepts.