[kwlug-disc] systemd timer VS crontab
Khalid Baheyeldin
kb at 2bits.com
Tue Jan 6 10:46:16 EST 2026
I am still on cron, and don't see a reason to move to anything else.
I use this command to edit and activate cron jobs for my regular user:
crontab -e
And I use this if the command needs to run as root:
sudo crontab -e
I don't mess with anything in /etc/cron* directly, except when there is no
other way.
For example, some script that packages installed there for daily crons, and
I need to change something.
For example, an email address or so.
There are even cases when I use cron for something that should be done
another way, just because it is easy.
For example, sometimes USB devices are not fully initialized when rtl_433
is run, so I have this:
# After a reboot, wait for a while, then restart the RTL-SDR stuff
@reboot /usr/bin/sleep 240; systemctl restart rtl-433mhz
Works consistently, and is much easier than messing with systemd units when
there is no obvious way.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20260106/71f0c889/attachment-0001.htm>
More information about the kwlug-disc
mailing list