I have/had a problem; I suspect that my cron jobs were asking for permission to run which since they were batch programs is not the desired behaviour. I have done some googling, and think it maybe related to the sudoers file, i.e. additional command are needed. At the moment I have turned cron off and am using systemd to manage the remaining services I need.
Links and hints
- https://askubuntu.com/questions/419548/how-to-set-up-a-root-cron-job-properly
- https://raspberrypi.stackexchange.com/questions/57835/why-my-script-is-not-executed-with-root-privileges-using-crontab
- https://raspberrypi.stackexchange.com/questions/32955/cron-job-doesnt-work-but-runs-successfully-manually
- https://forums.raspberrypi.com/viewtopic.php?t=296993
- sudo asks for-password-in-cronjob-script-but-the-same-script-works-without-password in terminal from stack overflow, recommends explicit call to sudo in the crontab. Don’t think it worked for me.
- Google gemini on the sudoers log, on Debian they use system logs to capture these events.
- https://www.maketecheasier.com/check-sudo-history-linux/, very readable, or so it seems
- Here is a man page explainer, from sudo.ws
- The man sudo @ linux.die.net