summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2017-12-12 00:26:33 +0200
committerAlex Grönholm <alex.gronholm@nextday.fi>2017-12-12 00:26:33 +0200
commit39cb1a5f65a2d5970b9639e3e324ad7953d261f9 (patch)
treec511cca2f7af557a008ad9d604efcfe1a80a102d /docs
parent858204838d78ac15ee6f9461ad26c57bbe96db4a (diff)
downloadapscheduler-39cb1a5f65a2d5970b9639e3e324ad7953d261f9.tar.gz
Added support for creating cron triggers from crontab expressions
Fixes #240.
Diffstat (limited to 'docs')
-rw-r--r--docs/modules/triggers/cron.rst3
-rw-r--r--docs/versionhistory.rst2
2 files changed, 5 insertions, 0 deletions
diff --git a/docs/modules/triggers/cron.rst b/docs/modules/triggers/cron.rst
index acc9295..a410bc2 100644
--- a/docs/modules/triggers/cron.rst
+++ b/docs/modules/triggers/cron.rst
@@ -108,6 +108,9 @@ The :meth:`~apscheduler.schedulers.base.BaseScheduler.scheduled_job` decorator w
def some_decorated_task():
print("I am printed at 00:00:00 on the last Sunday of every month!")
+To schedule a job using a standard crontab expression::
+
+ sched.add_job(job_function, CronTrigger.from_crontab('0 0 1-15 may-aug *'))
The ``jitter`` option enables you to add a random component to the execution time. This might be useful if you have
multiple servers and don't want them to run a job at the exact same moment or if you want to prevent jobs from running
diff --git a/docs/versionhistory.rst b/docs/versionhistory.rst
index 141f47c..7dc3473 100644
--- a/docs/versionhistory.rst
+++ b/docs/versionhistory.rst
@@ -15,6 +15,8 @@ APScheduler, see the :doc:`migration section <migration>`.
* Added support for named months (``january`` – ``december``) in ``CronTrigger`` month expressions
+* Added support for creating a ``CronTrigger`` from a crontab expression
+
* Fixed memory leak due to a cyclic reference when jobs raise exceptions
(thanks to gilbsgilbs for help on solving this)