Code: Select all
OP isn't using shell script in his example. It's just a command (date) and file redirect.
Are you really attempting to learn about cron, or are you attempting to fix a problem with "mydevices agent" or whatever?
That is a totally correct line for a user crontab, and I cannot realistically see it failing unless there is a typo in the actual file. The fact that nothing like it is mentioned in /var/log/cron suggests it is not present at all. Check by running "crontab -e" again. (No, the command does not need a full path.)5 * * * * date >> /home/pi/testing_cron
which I believe should run the date command every hour at 5 minutes past the hour
and then append the date to the file /home/pi/testing_cron. This NOT happening.
Do you know why this job is running? It is not a normal thing unless you have installed it or something that created it. And it is running as root.Jun 26 20:05:02 raspberrypi CRON: (root) CMD (/etc/myDevices/crontab.sh)
Jun 26 20:05:02 raspberrypi CRON: (CRON) info (No MTA installed, discarding output)
which seem to be added to the file every minute.