#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    Milian, Italy
    Posts
    357
    Rep Power
    13

    re-specify cron response email address


    after the cron jobs were done , it will mail out a email to the root or the equivalent.

    Can and how we re-specify the email address e.g. xyz@hotmail.com?

    thanks!
    worldtouch.
    an ordinary client of zoneedit.com
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    5
    Rep Power
    0
    Just specify xyz@hotmail.com at the end of your cron line followed by mail or sendmail command.

    For example:

    15 3 * * * /bin/sh /etc/daily 2>&1 | tee -a /var/log/daily_log | mail -s "Daily output at `date`" xyz@hotmail.com
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2001
    Location
    Milian, Italy
    Posts
    357
    Rep Power
    13
    You are right. I knew this now, if I do not specify, it will send to my normal email account.

    I want to ask machine to send me a 'the content of dmesg' which is store in 'iamfine' at 05:39 called by 'iamworking'.

    the script for 'iamworking' was written already.

    cron:

    38 5 * * * /home/jennifer/bscript/iamworking



    39 5 * * * mail -s "Backup Linux Server All systems goes" xyzc@hotmail.com < /home/jennifer/bscript/iamfine

    when I receive the email, it is not the real time dmesg. would u please help to correct this? thanks

    I do not understand '2>&1 ' of your explanation!
    Last edited by worldtouch; December 4th, 2001 at 09:34 PM.
    worldtouch.
    an ordinary client of zoneedit.com
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    5
    Rep Power
    0
    >> it is not the real time dmesg

    What real time? For whatever problem, it's within your script, therefore you need to fix it yourself.

    >> I do not understand '2>&1 ' of your explanation!

    You already asked me several times so I am not going to repeat my answer.

IMN logo majestic logo threadwatch logo seochat tools logo