Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recommendations for a script queuer

Tags:

python

There probably are such applications, but couldn't find them so I'm asking a question here.

I'd like a dynamic python script scheduler. It runs one script from beginning to end, and then reads the next script in queue, and executes it. I'd like to dynamically add new python scripts into the queue (and probably also delete it as well) If I do a list job, it should show me the list of all jobs that have been executed, and those that are still in the queue.

Do you know any program that provides such functionality? I know a Load Sharing Facility, but I don't need to distribute jobs to clusters, I just need to queue jobs on my machine...

like image 925
Chang Hyun Park Avatar asked Jan 27 '26 21:01

Chang Hyun Park


1 Answers

If you need an in-process scheduler, you can try APScheduler, which is quite simple to use and thoroughly documented. You can even build a custom scheduler program based on APScheduler, communicating with a minimal GUI through an SQL database

If you are looking for very basic functionality, you could also have a program polling a chosen directory (the pending jobs pool) for e.g. batch files. Each time it finds one, it moves it to another directory (the running jobs pool), runs it and finally moves it to a final directory (the executed jobs pool). Adding a job is as simple as adding a batch file, monitoring the queue consists in viewing the pending jobs's directory contents, etc.

This script can IMHO take less time to write than learning to use an advanced scheduler (let aside APScheduler).


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!