cron redirect output to a file

por | 9 enero, 2019

1)

Change the redirection to 2>&1. So now crontab -e looks like

*/1 * * * * /home/user1/vbackup.sh >> /home/user1/vbackup.log 2>&1

Iworks because by default cron is using sh to run the task

2)

Change the default shell by adding SHELL=/bin/bash in the crontab -e file.