@@ -291,33 +291,35 @@ def __repr__(self):
291291
292292
293293def cron (* ,
294- dft_queue = None ,
295- run_at_startup = False ,
296- unique = True ,
297294 month : Union [None , set , int ]= None ,
298295 day : Union [None , set , int ]= None ,
299296 weekday : Union [None , set , int , str ]= None ,
300297 hour : Union [None , set , int ]= None ,
301298 minute : Union [None , set , int ]= None ,
302299 second : Union [None , set , int ]= 0 ,
303- microsecond : int = 123456 ):
300+ microsecond : int = 123456 ,
301+ dft_queue = None ,
302+ run_at_startup = False ,
303+ unique = True ):
304304 """
305+ Decorator which defines a functions as a cron job, eg. it should be executed at specific times.
305306
306- Decorator which defines a functions as a cron job, eg. it should be executed at specific times...
307+ Workers will enqueue this job at or just after the set times. If ``unique`` is true (the default) the
308+ job will only be enqueued once even if multiple workers are running.
307309
308310 If you wish to call the function directly you can access the original function at ``<func>.direct``.
309311
310- :param dft_queue: default queue to use
311- :param run_at_startup: whether to run as worker starts
312- :param unique: whether the job should be only be executed on one worker.
313312 :param month: month(s) to run the job on, 1 - 12
314313 :param day: day(s) to run the job on, 1 - 31
315314 :param weekday: week day(s) to run the job on, 0 - 6 or mon - sun
316315 :param hour: hour(s) to run the job on, 0 - 23
317316 :param minute: minute(s) to run the job on, 0 - 59
318317 :param second: second(s) to run the job on, 0 - 59
319318 :param microsecond: microsecond(s) to run the job on,
320- defaults to 123456 as the world is busier at the top of a second 0 - 1e6
319+ defaults to 123456 as the world is busier at the top of a second, 0 - 1e6
320+ :param dft_queue: default queue to use
321+ :param run_at_startup: whether to run as worker starts
322+ :param unique: whether the job should be only be executed once at each time
321323 """
322324
323325 return lambda f : CronJob (
0 commit comments