Reputation: 5566
I've been reading this great post:
https://serverfault.com/questions/449651/why-is-my-crontab-not-working-and-how-can-i-troubleshoot-it
And I decided to modify a line of my cron task to output my echos and any problems it might encouter. My cron tab line looks like this:
30 08 * * * /root/scripts_server/backup_daily.sh &>/var/log/bkp_daily.log
The script runs correctly (I can confirm that the backups were made and transfered) and the output file is created (bkp_daily.log), but it is empty.
Can any one point out a problem?
EDIT:
This is an example of a line in the script:
echo "--------------Sincronización de git remotos a locales-----------------------"
Upvotes: 0
Views: 81
Reputation: 781088
I think &>
is a bash
extension, try using the standard shell syntax:
30 08 * * * /root/scripts_server/backup_daily.sh >/var/log/bkp_daily.log 2>&1
Upvotes: 2