1

How to redirect output to a file from within cron?

view story
linux-howto

http://unix.stackexchange.com – I have a backup script which I need to run at a particular time of a day so I am using cron for this task and from within cron am also trying to redirect the output of backup script to a logfile. crontab -e */1 * * * * /home/ranveer/backup.sh &>> /home/ranveer/backup.log In the above cron entry I am redirecting both stderr and stdout to a log file. The above cron job executes fine according to syslog and it performs the task mentioned in the backup.sh file but it doesn't write anything to the log file. /var/log/syslog Oct 19 20:26:01 ranveer CRON[15214]: (ranveer) CMD (/home/ (HowTos)