summaryrefslogtreecommitdiff
path: root/apscheduler/job.py
diff options
context:
space:
mode:
authorAlex Grönholm <alex.gronholm@nextday.fi>2014-05-28 08:11:13 +0300
committerAlex Grönholm <alex.gronholm@nextday.fi>2014-05-28 08:11:13 +0300
commit84331d01fca56fbf9f4824bbf1e12f57a66d5316 (patch)
treebdd45d2838d3c75af7ae8def9006ea9248637578 /apscheduler/job.py
parente19cfb835708fd4ef2e0747f13fafb4224070829 (diff)
downloadapscheduler-84331d01fca56fbf9f4824bbf1e12f57a66d5316.tar.gz
Fixed invocation of scheduler.modify_job()
Diffstat (limited to 'apscheduler/job.py')
-rw-r--r--apscheduler/job.py28
1 files changed, 26 insertions, 2 deletions
diff --git a/apscheduler/job.py b/apscheduler/job.py
index 9fc1804..19eb8b7 100644
--- a/apscheduler/job.py
+++ b/apscheduler/job.py
@@ -46,12 +46,36 @@ class Job(object):
"""
Makes the given changes to this job and saves it in the associated job store.
Accepted keyword arguments are the same as the variables on this class.
+
+ .. seealso:: :meth:`~apscheduler.schedulers.base.BaseScheduler.modify_job`
+ """
+
+ self._scheduler.modify_job(self.id, self._jobstore, **changes)
+
+ def pause(self):
+ """
+ Temporarily suspend the execution of this job.
+
+ .. seealso:: :meth:`~apscheduler.schedulers.base.BaseScheduler.pause_job`
+ """
+
+ self._scheduler.pause_job(self.id, self._jobstore)
+
+ def resume(self):
+ """
+ Resume the schedule of this job if previously paused.
+
+ .. seealso:: :meth:`~apscheduler.schedulers.base.BaseScheduler.resume_job`
"""
- self._scheduler.modify_job(self.id, **changes)
+ self._scheduler.resume_job(self.id, self._jobstore)
def remove(self):
- """Unschedules this job and removes it from its associated job store."""
+ """
+ Unschedules this job and removes it from its associated job store.
+
+ .. seealso:: :meth:`~apscheduler.schedulers.base.BaseScheduler.remove_job`
+ """
self._scheduler.remove_job(self.id, self._jobstore)