dbader / schedule

Python job scheduling for humans.
https://schedule.readthedocs.io/
MIT License
11.73k stars 959 forks source link

Parallel execution with queue and arguments #492

Open FalcoFalco opened 2 years ago

FalcoFalco commented 2 years ago

Is it possible to implement parallel execution with queue and functions with arguments?

Let's say this is my code have a function foo (a) that I need to call periodically.

def foo(ar): # do something with ar q = queue.Queue() How can I write this next call such that also the argument is passed? schedule.every(10).seconds.do(q.put, job).tag("tag")

I'll handle the queue as reported in the documentation