dbader / schedule

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

Potential problem of spawning sub processes #596

Closed gssakash closed 11 months ago

gssakash commented 1 year ago

Do I need to do anything special to handle the process not being terminated correctly incase I stop the execution of my program after which I expect it to stop the scheduler as well?

Do I need to be worried about the spawning of orphan processes on killing the main process which will keep running in the background which is not exactly what I want? And, how can I prevent this if it is a possibility that can occur while using this library?

Agent-Hellboy commented 1 year ago

Hi @gssakash, where are you using this, did you check the code? Is it creating a background process for job management? it's an in-process scheduler, https://github.com/dbader/schedule/blob/master/schedule/__init__.py#L675

if you are using this in a background process , if your process crashes or is killed, jobs will automatically get terminated

gssakash commented 1 year ago

Okay that makes sense, It was just a question I had and I have gotten a satisfactory answer. This issue can now be closed @Agent-Hellboy