
The short answer: whenever a scheduled task (cron job) writes anything to the screen, the system e-mails that text to the cron address. A task that runs every five minutes can send hundreds of messages a day. The fix is to tell the task where the output goes: to a file, or nowhere.
Where the output goes
| End of the command | What happens |
| >/dev/null 2>&1 | Throws everything away, errors included. Total silence. Careful: it hides failures. |
| >/dev/null | Throws away the normal output, but errors are still e-mailed. Usually the best. |
| >> /home/account/cron.log 2>&1 | Keeps everything in a file, to read when you need. Remember to clear it now and then. |
| Nothing | Everything the task writes goes by e-mail. |
| Changing the address | In cPanel, the “Cron Email” field is at the top of the cron jobs page. On a VPS, it is the MAILTO= line at the start of the crontab. |
Step by step
|
|
|
|
|
| Do not hide everything from a task you never tested. If the output goes nowhere and the task fails, nobody knows. First confirm it works, then silence it: A cron job that does not run. |
| For the schedule syntax: Schedule examples. A task every five minutes is not always needed: Cron jobs worth setting up. On WordPress: WP-Cron for a real cron job. |
|
Getting hundreds of cron messages and do not know which task? Open a ticket with the subject of one of them. Open a support ticket |
RECOMMENDED PRODUCT Professional e-mail on your domain Mailboxes in your company name, no adverts, with spam filtering. from 5.940,00 Kz/mo (3-year plan, with coupon) See plans |
- 0 Users Found This Useful











