Cron job not running
by Dain_Bramage from LinuxQuestions.org on (#4H7ZH)
I have two cron jobs in my (not root) crontab.
Code:0 2 * * * /home/mike/Scripts/rsync.sh
0 19 * * * /home/mike/Scripts/zfs.sh 2>&1 /tmp/testlog.logThe first one works, the second one does not.
If I run
Code:/home/mike/Scripts/zfs.shin terminal it works. How can this be? Both scripts are owned by me.
The output of
Code:cat /var/log/syslog | grep zfs.shis
Code:Jun 15 19:00:01 Ubuntu19-04 CRON[15434]: (mike) CMD (/home/mike/Scripts/zfs.sh 2>&1 /tmp/testlog.log)but there is no testlog.log file generated in the /tmp folder.
Code:0 2 * * * /home/mike/Scripts/rsync.sh
0 19 * * * /home/mike/Scripts/zfs.sh 2>&1 /tmp/testlog.logThe first one works, the second one does not.
If I run
Code:/home/mike/Scripts/zfs.shin terminal it works. How can this be? Both scripts are owned by me.
The output of
Code:cat /var/log/syslog | grep zfs.shis
Code:Jun 15 19:00:01 Ubuntu19-04 CRON[15434]: (mike) CMD (/home/mike/Scripts/zfs.sh 2>&1 /tmp/testlog.log)but there is no testlog.log file generated in the /tmp folder.