2

I created a crontab like this:

0 22 * * 2 /bin/echo " Hello World "
0  1 * * * /bin/echo " Test"

but I receive mails like this, what does it mean?

    
Subject: Cron  /bin/echo " Test"
Content-Type: text/plain; charset=UTF-8
Subject: Cron  /bin/echo " Test"
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: SHELL=/bin/sh>

X-Cron-Env: HOME=/home/studentuser>

X-Cron-Env: PATH=/usr/bin:/bin>

X-Cron-Env: LOGNAME=studentuser>

X-Cron-Env: USER=studentuser>
Date: Thu,  6 Jun 2013 00:57:01 -0400 (EDT)
Status: R

 Test

1 Answer 1

4

These are not errors. They are status reports.

You get these because your cron job generated output.

If your cron job has output then cron will mail this output. Either to the person specified in the variable MAILTO. If no one if specified, then the output will be mailed to the owner of the process that produced the output. (In this case: you).

If you do not want these mails then redirect the output somewhere. Either to a log file or to /dev/null.

2
  • Thank you very much, I was told if I get errors I get mails, so it's working fine ... :) Thank you
    – user229366
    Commented Jun 6, 2013 at 5:30
  • 1
    The custom is not to generate output if all goes well. Which means when things do not go well (errors) you often print an error. This text will be caught and mailed to you. In your case you also generated output when all worked fine. This is perfectly valid, just not common.
    – Hennes
    Commented Jun 6, 2013 at 5:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .