Cron sends a cron command as e-mail every day?

cholzer

Member
Nov 5, 2021
32
7
13
45
Yesterday I did a clean install of Proxmox 8
Today I received an odd e-mail from my system that I do not understand.

It reads:
Code:
test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily; }

So that seems to originate from:
Code:
/etc/crontab
Code:
17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily; }
47 6    * * 7   root    test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.weekly; }
52 6    1 * *   root    test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.monthly; }

But why the heck did I receive the cron job command via E-Mail ? o_O
I have never had this happen before on any Proxmox install.

I suppose this should have been the result of the default scrub job?

I enabled the e-mail settings as usual:
Code:
/etc/zfs/zed.d/zed.rc
ZED_EMAIL_PROG="mail"
ZED_NOTIFY_VERBOSE=1

When I do a scrub manually, then I get the correct message.
Code:
ZFS scrub_finish event for nvme on pve
 
Last edited:
Got the same E-mail from Cron again today.

can anyone tell me what is happening? o_O

Code:
From: Cron <root@pve>
test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily; }
 
It's normal behavior that cron will send the cronjobs output via mail. Either pipe the commands output into the void via ">/dev/null 2>&1" for singe commands or if you don't want to emails at all, add the line MAILTO="" to your crontab so cron got no recipient.
 
Last edited:
  • Like
Reactions: cholzer
It's normal behavior that cron will send the cronjobs output via mail. Either pipe the commands output into the void via ">/dev/null 2>&1" for singe commands or if you don't want to emails at all, add the line MAILTO="" to your crontab so cron got no recipient.
Thanks!
Since the ZFS scrub is triggered by cron, setting MAILTO="" will not disable that notification set in zed.rc, right? I do want to receive those. :)
 
Do you have any scripts in cron.daily? Maybe one is returning an error but not generating any output.
Thanks for that!
I did test netdata on this Proxmox machine but ended up uninstalling it shortly after.
Turns out the uninstall did not remove everything as it did leave a file in cron.daily :eek:

I have delete that file now. Lets see if the e-mails stop now.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!