| Some time ago I wanted the best bits from both worlds: - from cron: specifying all jobs in one file instead of scattering it across dosens of unit files. In 90%
of cases I just want a regular schedule and the command, that's it - from systemd: mainly monitoring and logging. But also flexible timers, timeouts, resource management, dependencies -- for the remaining 10% of jobs which are a little more complicated So I implemented a DSL which basically translates a python spec into systemd units -- that way I don't have to remember systemd syntax and manually manage the unit files. At the same time I benefit from the simplicity of having everything in one place. An extra bonus is that the 'spec' is just normal python code - you can define variables/functions/loops to avoid copy pasting - you can use mypy to lint it before applying the changes - I have multiple computers that share some jobs, so I simply have a 'common.py' file which I import from `computer1.py` and `computer2.py` -- the whole thing is very flexible. You can read more about it here: - https://beepb00p.xyz/scheduler.html - https://github.com/karlicoss/dron#what-does-it-do I've been using this tool for several year now, with hundreds of different jobs across 3 computers, and it's been working perfectly for me. One of the best quality of life improvements I've done for my personal infrastructure. |