Skip to content
This repository has been archived by the owner on May 22, 2021. It is now read-only.

Commit

Permalink
[AIRFLOW-6320] Add quarterly to crontab presets (apache#6873)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongjiajie authored and galuszkak committed Mar 5, 2020
1 parent 98f1c7a commit 6bd8da3
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
1 change: 1 addition & 0 deletions airflow/utils/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
'@daily': '0 0 * * *',
'@weekly': '0 0 * * 0',
'@monthly': '0 0 1 * *',
'@quarterly': '0 0 1 */3 *',
'@yearly': '0 0 1 1 *',
}

Expand Down
38 changes: 20 additions & 18 deletions docs/dag-run.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,26 @@ a ``str``, or a ``datetime.timedelta`` object.

Alternatively, you can also use one of these cron "presets":

+--------------+----------------------------------------------------------------+---------------+
| preset | meaning | cron |
+==============+================================================================+===============+
| ``None`` | Don't schedule, use for exclusively "externally triggered" | |
| | DAGs | |
+--------------+----------------------------------------------------------------+---------------+
| ``@once`` | Schedule once and only once | |
+--------------+----------------------------------------------------------------+---------------+
| ``@hourly`` | Run once an hour at the beginning of the hour | ``0 * * * *`` |
+--------------+----------------------------------------------------------------+---------------+
| ``@daily`` | Run once a day at midnight | ``0 0 * * *`` |
+--------------+----------------------------------------------------------------+---------------+
| ``@weekly`` | Run once a week at midnight on Sunday morning | ``0 0 * * 0`` |
+--------------+----------------------------------------------------------------+---------------+
| ``@monthly`` | Run once a month at midnight of the first day of the month | ``0 0 1 * *`` |
+--------------+----------------------------------------------------------------+---------------+
| ``@yearly`` | Run once a year at midnight of January 1 | ``0 0 1 1 *`` |
+--------------+----------------------------------------------------------------+---------------+
+----------------+----------------------------------------------------------------+-----------------+
| preset | meaning | cron |
+================+================================================================+=================+
| ``None`` | Don't schedule, use for exclusively "externally triggered" | |
| | DAGs | |
+----------------+----------------------------------------------------------------+-----------------+
| ``@once`` | Schedule once and only once | |
+----------------+----------------------------------------------------------------+-----------------+
| ``@hourly`` | Run once an hour at the beginning of the hour | ``0 * * * *`` |
+----------------+----------------------------------------------------------------+-----------------+
| ``@daily`` | Run once a day at midnight | ``0 0 * * *`` |
+----------------+----------------------------------------------------------------+-----------------+
| ``@weekly`` | Run once a week at midnight on Sunday morning | ``0 0 * * 0`` |
+----------------+----------------------------------------------------------------+-----------------+
| ``@monthly`` | Run once a month at midnight of the first day of the month | ``0 0 1 * *`` |
+----------------+----------------------------------------------------------------+-----------------+
| ``@quarterly`` | Run once a quarter at midnight on the first day | ``0 0 1 */3 *`` |
+----------------+----------------------------------------------------------------+-----------------+
| ``@yearly`` | Run once a year at midnight of January 1 | ``0 0 1 1 *`` |
+----------------+----------------------------------------------------------------+-----------------+

Your DAG will be instantiated for each schedule along with a corresponding
DAG Run entry in the database backend.
Expand Down

0 comments on commit 6bd8da3

Please sign in to comment.