Skip to content

Commit e4266fe

Browse files
zhongjiajieChris Fei
authored andcommitted
Add quarterly to crontab presets (apache#6873)
1 parent 78858b7 commit e4266fe

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

airflow/utils/dates.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
'@daily': '0 0 * * *',
3535
'@weekly': '0 0 * * 0',
3636
'@monthly': '0 0 1 * *',
37+
'@quarterly': '0 0 1 */3 *',
3738
'@yearly': '0 0 1 1 *',
3839
}
3940

docs/scheduler.rst

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,26 @@ preferably a
6464
a ``str``, or a ``datetime.timedelta`` object. Alternatively, you can also
6565
use one of these cron "preset":
6666

67-
+--------------+----------------------------------------------------------------+---------------+
68-
| preset | meaning | cron |
69-
+==============+================================================================+===============+
70-
| ``None`` | Don't schedule, use for exclusively "externally triggered" | |
71-
| | DAGs | |
72-
+--------------+----------------------------------------------------------------+---------------+
73-
| ``@once`` | Schedule once and only once | |
74-
+--------------+----------------------------------------------------------------+---------------+
75-
| ``@hourly`` | Run once an hour at the beginning of the hour | ``0 * * * *`` |
76-
+--------------+----------------------------------------------------------------+---------------+
77-
| ``@daily`` | Run once a day at midnight | ``0 0 * * *`` |
78-
+--------------+----------------------------------------------------------------+---------------+
79-
| ``@weekly`` | Run once a week at midnight on Sunday morning | ``0 0 * * 0`` |
80-
+--------------+----------------------------------------------------------------+---------------+
81-
| ``@monthly`` | Run once a month at midnight of the first day of the month | ``0 0 1 * *`` |
82-
+--------------+----------------------------------------------------------------+---------------+
83-
| ``@yearly`` | Run once a year at midnight of January 1 | ``0 0 1 1 *`` |
84-
+--------------+----------------------------------------------------------------+---------------+
67+
+----------------+----------------------------------------------------------------+-----------------+
68+
| preset | meaning | cron |
69+
+================+================================================================+=================+
70+
| ``None`` | Don't schedule, use for exclusively "externally triggered" | |
71+
| | DAGs | |
72+
+----------------+----------------------------------------------------------------+-----------------+
73+
| ``@once`` | Schedule once and only once | |
74+
+----------------+----------------------------------------------------------------+-----------------+
75+
| ``@hourly`` | Run once an hour at the beginning of the hour | ``0 * * * *`` |
76+
+----------------+----------------------------------------------------------------+-----------------+
77+
| ``@daily`` | Run once a day at midnight | ``0 0 * * *`` |
78+
+----------------+----------------------------------------------------------------+-----------------+
79+
| ``@weekly`` | Run once a week at midnight on Sunday morning | ``0 0 * * 0`` |
80+
+----------------+----------------------------------------------------------------+-----------------+
81+
| ``@monthly`` | Run once a month at midnight of the first day of the month | ``0 0 1 * *`` |
82+
+----------------+----------------------------------------------------------------+-----------------+
83+
| ``@quarterly`` | Run once a quarter at midnight on the first day | ``0 0 1 */3 *`` |
84+
+----------------+----------------------------------------------------------------+-----------------+
85+
| ``@yearly`` | Run once a year at midnight of January 1 | ``0 0 1 1 *`` |
86+
+----------------+----------------------------------------------------------------+-----------------+
8587

8688
**Note**: Use ``schedule_interval=None`` and not ``schedule_interval='None'`` when
8789
you don't want to schedule your DAG.

0 commit comments

Comments
 (0)