|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
mail a log file
I want a cron job that mails a log file to a user.
My crontab entry says 43 15 * * 5 more /usr/logfile | mail user@company.com It isn't mailing Whats wrong? Thanks |
|
#2
|
|||
|
|||
|
You should use "cat", not "more".
Another problem could be the path of the mail command and/or permissions. Which user's crontab is it? Can this user read the log file when logged in? Does it work when you supply the full path to "mail"? hth, M.
__________________
-- Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more. |
|
#3
|
|||
|
|||
|
|
|
#4
|
|||
|
|||
|
are you sure your MTA is set up correctly?
__________________
Disclaimer: the owner of this post is NOT responsible for any moral and/or physical damage this post could cause to you. |
|
#5
|
|||
|
|||
|
In that format, more file | mail user, I can do it at the command line. It just won't in the cron job. I did it the way I stated before. Is there a difference in doing it at the command line that in a cron job, as far as the way mail is set up?
|
|
#6
|
|||
|
|||
|
Quote:
|
|
#7
|
|||
|
|||
|
Yes Hirsch is right. Although the path probably isn't an issue (as your mta is probably in a standard path) it's possible that user 'cron' isn't allowed to execute it...
Check what groups 'cron' is part of. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > mail a log file |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|