I have a series of cron jobs on a server machine. I know I can redirect their stdout/stderr output to a file. If I redirect several cronjob outputs to the same file, will that work even if some of the jobs might be running at the same time?
|
feedback
|
|
No, it's likely that they will overwrite each other. As a simple method add
at the top of the crontab, then cron will email any output to you. A more complex method may involve setting up To be honest, I prefer cron jobs that output nothing unless there is a problem, in which case | |||
|
feedback
|
|
even simpler method is to pipe all output into 'logger' tool and log to syslog, i.e.
then look in /var/log/messages the disadvantage is that this is machine wide and you have to be root to be able to see the log, although it is possible to set up separate syslog files with user accessible permissions. | |||
|
feedback
|