Forums Register Login

Cron job sending email didn't work

+Pie Number of slices to send: Send
Hi all,

Was trying to schedule a task using cron to send an email of a log file to myself, but can't seems to get it to work. I'm using Solaris 9. I'm using the root account.

This is how my cron file looks like:
10 17 16 2 * mail emailme@mail.com < /disk01/opt/bea/user_projects/web/application.log

I did stop & start the cron again after I edited the file. I used /etc/init.d/cron stop & /etc/init.d/cron start.

Any help would be much appreciated.

Thanks!
+Pie Number of slices to send: Send
I usually do it this way
10 17 16 2 * cat /disk01/opt/bea/user_projects/web/application.log | mail emailme@mail.com
[ February 16, 2005: Message edited by: Ben Souther ]
+Pie Number of slices to send: Send
And like alot commands in Linux/Unix, there are always alternative ways of doing the samething.

Another suggestion is create a script and run it from your cron process:

+Pie Number of slices to send: Send
My mistake try this:





I hope this helps.
+Pie Number of slices to send: Send
Cron doesnt know about your $PATH settings - you need to put the full path to all your commands / scripts - e.g. /usr/bin/mail instead of mail
+Pie Number of slices to send: Send
Hi guys,

Thank you very much for all your suggestions & advice. It seems that the Solaris machine that I'm using had not been configured to send out email yet. I'd try to set it up & see if I could get the cron job working.

Thanks!
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1069 times.
Similar Threads
Java SocketServer running as a Linux Service .exec() question
how to redirect from apache to tomcat..?
Suse Linux Disabling sendmail
how to execute thread on linux web server?
Problem in printing a pdf file using pdfrenderer
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 03:56:28.