mirror of
https://github.com/django-q2/django-q2.git
synced 2026-09-15 13:37:56 +08:00
getting docs ready for 0.2.0
This commit is contained in:
@@ -30,10 +30,57 @@ Schedules are regular Django models. You can manage them through the :ref:`admin
|
||||
:param str func: the function to schedule. Dotted strings only.
|
||||
:param args: arguments for the scheduled function.
|
||||
:param str hook: optional result hook function. Dotted strings only.
|
||||
:param str schedule_type: (O)nce, (H)ourly, (D)aily, (W)eekly, (M)onthly, (Q)uarterly, (Y)early
|
||||
:param str schedule_type: (O)nce, (H)ourly, (D)aily, (W)eekly, (M)onthly, (Q)uarterly, (Y)early or :attr:`Schedule.TYPE`
|
||||
:param int repeats: Number of times to repeat schedule. `-1`=Always, `0`=Never, `n` =n.
|
||||
:param datetime next_run: Next or first scheduled execution datetime.
|
||||
:param kwargs: optional keyword arguments for the scheduled function.
|
||||
|
||||
.. py:class:: Schedule
|
||||
.. class:: Schedule
|
||||
|
||||
A database model for task schedules.
|
||||
|
||||
.. py:attribute:: func
|
||||
|
||||
The function to be scheduled
|
||||
|
||||
.. py:attribute:: hook
|
||||
|
||||
Optional hook function to be called after execution.
|
||||
|
||||
.. py:attribute:: args
|
||||
|
||||
Positional arguments for the function.
|
||||
|
||||
.. py:attribute:: kwargs
|
||||
|
||||
Keyword arguments for the function
|
||||
|
||||
.. py:attribute:: schedule_type
|
||||
|
||||
The type of schedule. Follows :attr:`Schedule.TYPE`
|
||||
|
||||
.. py:attribute:: TYPE
|
||||
|
||||
`ONCE`, `HOURLY`, `DAILY`, `WEEKLY`, `MONTHLY`. `QUARTERLY`, `YEARLY`
|
||||
|
||||
.. py:attribute:: repeats
|
||||
|
||||
Number of times to repeat schedule. `-1`=Always, `0`=Never, `n` =n.
|
||||
|
||||
|
||||
.. py:attribute:: next_run
|
||||
|
||||
Datetime of the next scheduled execution.
|
||||
|
||||
.. py:attribute:: task
|
||||
|
||||
Name of the last task generated by this schedule.
|
||||
|
||||
.. py:method:: last_run()
|
||||
|
||||
Admin link to the last executed task.
|
||||
|
||||
.. py:method:: success()
|
||||
|
||||
Returns the success status of the last executed task.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user