Results 1 to 6 of 6

Thread: cron no longer sends mail to root after cron finishes.

  1. #1

    Question cron no longer sends mail to root after cron finishes.

    In the past root (cron is running root entries) received mailx from cron after it completed. I no longer receive emails from cron in 42.2. Root is setup to receive system mail. I believe the default is that cron will send output from the scripts to user of the cron.

    How do I fix this? I want to receive an mail (the output) from cron on the job!
    Johnf

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,163

    Default Re: cron no longer sends mail to root after cron finishes.

    Quote Originally Posted by John_fabiani View Post
    In the past root (cron is running root entries) received mailx from cron after it completed. I no longer receive emails from cron in 42.2. Root is setup to receive system mail. I believe the default is that cron will send output from the scripts to user of the cron.

    How do I fix this? I want to receive an mail (the output) from cron on the job!
    Johnf
    What do you mean with "in the past"? Is that before you started to run Leap 42.2, and when yes, what version did you run then? Or did it work in Leap 42.2, but stopped it after e.g. some update?
    Henk van Velden

  3. #3

    Default Re: cron no longer sends mail to root after cron finishes.

    Also check the settings in /etc/sysconfig/cron.

    In particular SEND_MAIL_ON_NO_ERROR and SEND_OUTPUT_ON_NO_ERROR.

    By default, cron only sends emails if there is an error.

  4. #4

    Default Re: cron no longer sends mail to root after cron finishes.

    Quote Originally Posted by wolfi323 View Post
    Also check the settings in /etc/sysconfig/cron.

    In particular SEND_MAIL_ON_NO_ERROR and SEND_OUTPUT_ON_NO_ERROR.

    By default, cron only sends emails if there is an error.
    I discovered that both were 'no' and I set the first to 'yes'. Yes you are correct I did in fact update from 13.2->42.1->42.2. I hope this will provide mail to root and I can determine if the job completed.

  5. #5

    Default Re: cron no longer sends mail to root after cron finishes.

    Quote Originally Posted by John_fabiani View Post
    I discovered that both were 'no' and I set the first to 'yes'. Yes you are correct I did in fact update from 13.2->42.1->42.2. I hope this will provide mail to root and I can determine if the job completed.
    I wonder if I added 1>2 at the end of the script would that force output - including errors?
    Johnf

  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,163

    Default Re: cron no longer sends mail to root after cron finishes.

    Quote Originally Posted by John_fabiani View Post
    I wonder if I added 1>2 at the end of the script would that force output - including errors?
    Johnf
    I do not think that
    Code:
    1>2
    will do anything that the OP likes.
    Please double check what you write/type. Putting this at the end of a command will redirect all stdout output to a file called 2 in the current directory. Is that what you suggest as an improvement in the case of the OP?
    Henk van Velden

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •