im trying to run a script stored in my home directory via crontab, but it's not working. The CRON log just says this every time it's running:
Sep 3 18:30:01 backup CRON[6778]: (root) CMD (/home/hannes/script > /tmp/yc.log)
Sep 3 18:30:01 backup CRON[6777]: (CRON) info (No MTA installed, discarding output)
Crontab:
*/1 * * * * /home/hannes/script > /tmp/yc.log
If I try to add the .sh file extension, it does not change anything.
The yc.log file stays empty.
This is the Script I'm trying to execute (Works fine if I run it manually):
#!/bin/sh
cp -r -p mnt/main-nas/PATH-TO-FILE mnt/backup-nas/01/temp/server
zip -r mnt/backup-nas/01/1.19_Test.`date +%d.%m.%Y_%H.%M.%S`.zip mnt/backup-nas/01/temp/server
rm -r mnt/backup-nas/01/temp/server
Any help is appreciated! :)