• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Cron Deamon reports

C

check.nl

Guest
Hi there,

We are using curl -s to execute some cronjobs on our server.
Now every execution(hourly) generates an e-mail that has to be send.

Does anyone now how to disable the reporting. I don't want an e-mail for everytime a cronjob is exceuted.
I believe there is an option you can add to the command line so the mails will not be sent.

Please be so kind to inform me if anyone knows how to do this.

Kind regards,

Coen Heck
 
Put the following on the end of the cronjob line:
>/dev/null 2>&1
So a line may look like:
Code:
0     22     *     *     *     /usr/bin/rkhunter  --update  >/dev/null  2>&1
 
The email is generated always, when a script running by cron produces output.

If you think you don't need the output, add the following at the end of your command line, separated by a space:

>/dev/null

To suppress only standard message

>/dev/null 2>&1

To suppress standard output AND error messages (not recommended)
 
Format of /dev/null command

Thanks for the replies.

I have tried the following two lines but as far as I can see they both don't work.
I keep getting Cron Daemon reports.

curl -s /dev/null http://www.mydomain.nl/beheer/cron_bounce.php

curl -s http://www.mydomain.nl/beheer/cron_bounce.php /dev/null

Can someone see if I'm doing anything wrong?
We are using a Plesk 7.5 controlled server and these commands are entered in the corntab of the concerning domain name.

Regards,

Check
 
Did you read the example cron which was posted earlier??

You HAVE to have the ">" character. Please see the example ShadowMan posted above.
 
Back
Top