Anthony Key
asked on
Simple Mailx script
Hi I'm looking for a very simple 2 - 3 line mailx script to send a one line message to my email address. I need this to test setting up some jobs in a scheduler program.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi,
I am repeating since there shouldn't be a space
0 3 * * * /pat/to/myscript 2>&1 | mailx -s "script results" me@mydomain
I am repeating since there shouldn't be a space
0 3 * * * /pat/to/myscript 2>&1 | mailx -s "script results" me@mydomain
ASKER
Thanks yuzh, in addition I had to change some permissions but it ran perfectly in Contol -M.
Thanks,
7Souls
Thanks,
7Souls
If you are going to use it in crontab:
0 3 * * * /pat/to/myscript 2> &1 | mailx -s "script results" me@mydomain