Troubleshooting cronjob

Plenty of times, perfectly working scripts can't seem to be executed properly when configured as cronjob. The annoying part is cron seem to only log the time when the script is executed and nothing else.

The solution is actually rather simple, just add the following lines to the end of your script
>/tmp/cronscript.log 2>&1

After the script is executed, you will be able to see the error messages

Hints: Most of the time, cron job is just missing the $PATH environment variable.

Cheers

Comments

Popular posts from this blog

SLES 15 LVM + XFS Without Separate /boot Partition

Docker Rootless on Ubuntu (2026 Guide)

pfSense and scp