Schedule name is optional

For backwards compatibility the schedule name is an optional keyword in the `schedule` function.

Adjusted docs accordingly
This commit is contained in:
Ilan
2015-07-18 19:41:21 +02:00
parent 05d6ecb7a2
commit e4737d765a
5 changed files with 12 additions and 6 deletions

View File

@@ -48,12 +48,13 @@ If you want to schedule regular Django management commands, you can use the :mod
Reference
---------
.. py:function:: schedule(func, *args, hook=None, schedule_type='O', repeats=-1, next_run=now() , **kwargs)
.. py:function:: schedule(func, *args, name=None, hook=None, schedule_type='O', repeats=-1, next_run=now() , **kwargs)
Creates a schedule
:param str name: A sensible name for your schedule
:param str func: the function to schedule. Dotted strings only.
:param args: arguments for the scheduled function.
:param str name: An optional name for your schedule.
: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 or :attr:`Schedule.TYPE`
:param int repeats: Number of times to repeat schedule. -1=Always, 0=Never, n =n.
@@ -70,7 +71,7 @@ Reference
.. py:attribute:: name
A name for your schedule. Tasks created by this schedule will assume this as their group id.
A name for your schedule. Tasks created by this schedule will assume this or the primary key as their group id.
.. py:attribute:: func