Direct Cron Output in Text
My server has no MTA (Postfix, Sendmail, Exim) installed so it can't email me the results of any cron job I schedule. I would then like to have the results from Cron be dumped into a small text file so I can read it later to view any issues.
Right now my job is as follows: Code:
01 18 * * * /usr/bin/shellscript.sh |
You can redirect both the standard error and the standard output to a file with the current date in its name, e.g. something like this:
Code:
1 18 * * * /usr/bin/shellscript.sh > /path/to/$(date +\%Y\%m\%d)_cron.log 2>&1 Code:
exec > /path/to/$(date +%Y%m%d)_cron.log 2>&1 |
All times are GMT -5. The time now is 04:16 PM. |