Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python based job scheduler with dependency resolution

Tags:

python

I'm looking for a Python based job scheduler which has job dependency resolution (may be specified in XML format). The existing ones mostly kick-off jobs at certain times but don't resolve dependencies between the jobs i.e. job Z which is dependent on job X and Y should only kick-off after successful completion of X & Z.

This is expected to run on 64-bit Windows. The less the dependencies/installation requirements, the better.

like image 977
Soumen Dass Avatar asked May 30 '12 12:05

Soumen Dass


1 Answers

You may want to git a try to RQ.

To execute a job that depends on another job, use the depends_on argument:

q = Queue('low', async=False) 
report_job = q.enqueue(generate_report)
q.enqueue(send_report, depends_on=report_job)

The ability to handle job dependencies allows you to split a big job into several smaller ones. A job that is dependent on another is enqueued only when it's dependency finishes successfully.

like image 56
karlcow Avatar answered Oct 09 '22 18:10

karlcow