Elektrine lite

← Feed

@mholiv@lemmy.world

Post #966046

2026-04-03 10:53 UTC

I think if you know cron from the start it can be easier, but it gets really annoying really fast. Compare: 0 0 * * * /usr/bin/flock -n /tmp/myjob.lock bash -c 'sleep $((RANDOM % 3600)) && /usr/local/bin/myjob.sh' To: [Timer] OnCalendar=daily RandomizedDelaySec=1h That and things like systemd preventing overlapped delays, handing what to do if the system was down during the last cycle, built in logging and event tracking. Seeing successful vs non successful runs etc. Once you add in those production corner cases cron gets annoying fast and timers are easy.

Replies (2)

  • @KeithD@lemmy.nz 2026-04-03 11:50

    For adding a quick thing to make something happen at a specific time, I can add a cron job in a couple of minutes. To add a timer takes creating a couple of files with syntax that took me a while to look up last time I needed it, and running a command. Then debugging. Sure, the timer has benefits, but cron jobs are still *simpler*. On the bright side, there's actually a "crontab -t" command that apparently can be used to generate timer files from a crontab line, which I hadn't known of before today.

    Open ##1812637

  • @racketlauncher831@lemmy.ml 2026-04-04 04:40

    Something looks more complicated is not a problem. Compare long division to a calculator, why would one think the calculator is more elegant? The calculator only enabled those who can't do math acquire the answer. And somehow in modern time, learning is someone who should be ashamed of??? Since when?

    Open ##1812638