Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A nice feature of Systemd timers is the ability to say something like "run once per 24 hour period, but I don't care when". The task runs at a random time during the period, which is nice for tasks that hit network services, since you don't get a zillion clients hitting the server at the same time. (i.e. local midnight or UTC midnight.)

Package repo updates and Let's Encrypt renewals are a couple services I've seen use this. There isn't a great way to do this with cron that I know of, besides running some script that sleeps for a random duration.

That said, I still use cron for things that don't need this feature because it's portable and I'm just more familiar with it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: