(no title)
karlicoss | 2 years ago
E.g. a simplest job definition looks like this
job(every(mins=10), 'ping https://beepb00p.xyz', unit_name='ping-beepb00p')
But also it's possible to add more properties, e.g. arbirary systemd properties, or custom notification backends (e.g. telegram message or desktop notification)Since it's python, I can reuse variables, use for loops, import jobs from other files (e.g. if there are shared jobs between machines), and check if it's valid with mypy.
Been using this for years now, and very happy, one of the most useful tools I wrote.
It's a bit undocumented and messy but if you are interested in trying it out, just let me know, I'm happy to help :)
networked|2 years ago
I recommend the post. It covers pros and cons of fcron, systemd timers, and other alternatives to cron.
qwertox|2 years ago
https://apscheduler.readthedocs.io/en/3.x/modules/triggers/c...
`sched.add_job(job_function, 'cron', day_of_week='mon-fri', hour=5, minute=30, end_date='2014-05-30')`
Sometimes also `schedule` https://github.com/dbader/schedule
`schedule.every(5).to(10).minutes.do(job)`