2

After upgrade to macOS Catalina 10.15, I no longer receive emails from crontab jobs. Sometimes it's desirable, but in most cases I need to see these errors, so I could act on failures.

I know I can add to | /usr/bin/mail -s "crontab job" [email protected] to cron job to restore this functionality, but it's a hard way.

Adding crontab to Full Disk Access -- did not help, but realistically it shouldn't have.

Did someone managed to fix this odd behavior?

2 Answers 2

1

This issue was resolved with the macOS 10.15.4 update released in March 2020.

After upgrade to 10.15.4, I started to receive emails from cron jobs I configured. Note, you have to set

MAILFROM and MAILTO environmental variables in cron in order to receive these emails.

Example:

[email protected]
[email protected]

...

* * * * * sample_job
-1

You need to put the full paths of each program in and not just crontab as a string.

In your case

/usr/bin/mail
/usr/sbin/cron

Post a screen shot of your exact list if you think you might not have the paths correct or if I made a typo so we can work on an edit to this to fix your issue.

3
  • I did not ask anything about running commands. I have a problem, where crontab in macOS Catalina does not generate an email on job run if there is an output to either stderr or stdout. How path to a tool can help? Oh, and rsync works perfectly fine.
    – sashk
    Commented Dec 21, 2019 at 18:24
  • @sashk the binaries literally won’t run in many cases. Perhaps if you edited in more details or provided how to reproduce your setup someone would have a better idea than I. I suspect your “add crontab” didn’t do what you think it did or would.
    – bmike
    Commented Dec 21, 2019 at 19:22
  • what do you mean by "binaries won't run in many cases"? This is not objective of this question. Objective of this question is why crontab on macOS Catalina stopped mailing output of command when it runs? I don't ask WHY command doesn't run -- I know for sure that it runs. So your answer is not for the question I'm asking.
    – sashk
    Commented Dec 22, 2019 at 4:17

You must log in to answer this question.

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