no vixie cron on laptop
joeyh at
I switched my laptop to systemd-cron. vixie cron is a beloved old thing, but it wakes up once per minute, checks every cron job to see if any need to run, and that's not ideal on a laptop; it wastes battery power.
systemd-cron still has some rough edges, but it avoids doing that; no wakeups until the next time a job is scheduled to run. Actually, systemd-cron is just a few hundred lines of python code, that translate crontabs into systemd service files. It's developed independently of systemd, it just reuses systemd's timer support to implement cron and anacron.
One thing that systemd-cron doesn't support, since a standard crontab cannot express it, is the ability for the system to wake from suspend when a job is scheduled to run. Imagine a backup server that wakes up when the next backup is scheduled, and then goes back to sleep until the next day or next week. Or a mpd box that's not always left on, but wakes up to pull down the latest podcasts at the times their RSS feeds say they'll be published. Systemd does support timers that do that, so it can be done with a custom service file.
... Hmm, or a laptop that wakes up at 7 am to download the morning email blast and optionally to be an alarm clock. I think I might just code that up. :)
Ambrose Andrews, Jakukyo Friel, uıɐɾ ʞ ʇɐɯɐs, Charles Stanhope and 1 others likes this.
uıɐɾ ʞ ʇɐɯɐs shared this.