|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Cron Job output to system output or a file
Hi ,
How can I send output of crontab to system output or to a file rather than to an email. In which case do I need to specify the MAILTO option in the cron input file. Thanks, Sathi |
|
#2
|
||||
|
||||
|
Use the output redirection operator (>).
Code:
0 * * * * root /path/to/program > /path/to/file
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month Looking for a perl job with kick-*** programmers in a well-known NASDAQ listed tech company with branches in the US and Europe? We're hiring. PM me for details. Requirements |
|
#3
|
|||
|
|||
|
Thanks a lot.
It works well for me. Can you please tell me how to append data to a log file? Now only the output of lastrun is in the file. I need to append it to a file. Thanks, Sathi |
|
#4
|
|||
|
|||
|
I just used '>>' instead of '>' and it started appending..
Sathi |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Cron Job output to system output or a file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|