On Github djcron-project / djcron-slides
# Task to do nothing * * * * * root do_some_stuff * */5 * * * root do_more_stuff # third command */3 * * * * root take_on_the_world
# Task to do nothing * * * * * root do_some_stuff * */5 * * * root do_more_stuff # third command */3 * * * * root take_on_the_world
Current requirements are quite different!
Different execution requirements:
bar
try: task_main() # Runs on agent task_success() # Runs on server except: task_failure() # Runs on server
@celery.task.task(name='Cron worker') def djcron_worker(job_id, *args, **kwargs): """ Launches a Job """ exec_id = uuid().hex LOGGER.debug('[%s] Launching job', exec_id) load = djcron_retrieve_script.si(exec_id=exec_id, job_id=job_id) run = run_script.s(exec_id=exec_id) store = djcron_save_results.s(exec_id=exec_id, job_id=job_id) error = djcron_error.s(exec_id=exec_id, job_id=job_id) chain = load | run | store chain.link_error = error chain.delay()
This should be improved to allow more customization: