| ▲ | bakugo an hour ago | ||||||||||||||||||||||||||||||||||
Has it actually served you well? Because it hasn't served me well at all. I am not the biggest fan of systemd, but today I will always reach for a systemd timer over cron simply due to the sheer amount of bad experiences I've had with cron. Hours upon hours wasted trying to troubleshoot crons that weren't working due to some stupid obscure issue, having to use dirty hacks to monitor for success or retry failed jobs. A few years ago I was trying to run a very simple bash script with cron and the script just died halfway through for no reason. Nothing in logs, worked fine when run directly, but in cron it just stopped halfway through a loop. Never figured out the cause, just gave up and used a timer instead, which worked fine. Never touched cron again after that. The ease and convenience of monitoring and troubleshooting alone are worth switching over. | |||||||||||||||||||||||||||||||||||
| ▲ | egorfine an hour ago | parent [-] | ||||||||||||||||||||||||||||||||||
Let me state once again: "within its very clear limitations". Once you learn that env in cron is not same as in your shell and once you learn to redirect output to loggers - it works just fine. It would be a lie to say that I never debugged cron and sure it's annoying. > and the script just died halfway through for no reason Unrelated to cron. Bad script. | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||