DEV Community

Discussion on: Python Scheduler: A cron job replacement

Collapse
 
aderchox profile image
aderchox • Edited

Good one, and explained well, thanks. But it doesn't seem to be as flexible as systemd timers (or even cron). E.g., what if the system reboots? Then we'll have to either manually run nohup /path/to/scheduler.py & again or we'll have to add a cron / systemd timer in order to trigger that script at the startup which makes the use of that library questionable in the first place. Or as another example, if we want the job to run as soon as a certain destination is pingable. Not that this latter one is 'impossible' with Python, but it's not as 'out-of-the-box' as it's in systemd.
Of course it's more 'portable' but that's sometimes not needed beyond theory.

Collapse
 
damjand profile image
Damjan Dimitrov

I agree with you, it has its advantages and disadvantages. When using this library it's preferable to use it in a remote server which is expected to have a nearly or completely uninterrupted uptime, such as a build server for an application. It might also become heavy on the system if used on a local machine where other work is also being done.