Redirecting cron job output to log file
How to redirecting cron job output to log file :
1 |
*/5 * * * * /home/venkatesh/campaign.sh >> /var/log/precampaign.log 2>&1 |
Note :
2>&1 indicates that the standard error (2>) is redirected to the same file descriptor that is pointed by standard output (&1).