apscheduler.job
¶
API¶
-
class
apscheduler.job.
Job
(scheduler, id=None, **kwargs)¶ Contains the options given when scheduling callables and its current schedule and other state. This class should never be instantiated by the user.
Variables: - id (str) – the unique identifier of this job
- name (str) – the description of this job
- func – the callable to execute
- args (tuple|list) – positional arguments to the callable
- kwargs (dict) – keyword arguments to the callable
- coalesce (bool) – whether to only run the job once when several run times are due
- trigger – the trigger object that controls the schedule of this job
- executor (str) – the name of the executor that will run this job
- misfire_grace_time (int) – the time (in seconds) how much this job’s execution is allowed to be late
- max_instances (int) – the maximum number of concurrently executing instances allowed for this job
- next_run_time (datetime.datetime) – the next scheduled run time of this job
-
modify
(**changes)¶ 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.
See also
-
pause
()¶ Temporarily suspend the execution of this job.
See also
-
pending
¶ Returns
True
if the referenced job is still waiting to be added to its designated job store.
-
remove
()¶ Unschedules this job and removes it from its associated job store.
See also
-
reschedule
(trigger, **trigger_args)¶ Shortcut for switching the trigger on this job.
See also
-
resume
()¶ Resume the schedule of this job if previously paused.
See also