Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

empty MAILTO considered as bad minute #16

Closed
bjacquin opened this issue Dec 18, 2017 · 1 comment
Closed

empty MAILTO considered as bad minute #16

bjacquin opened this issue Dec 18, 2017 · 1 comment

Comments

@bjacquin
Copy link

bjacquin commented Dec 18, 2017

Hi,

If I create a file in /etc/cron.d with the following content:

MAILTO=

0 *   * * *   nobody /opt/scripts/...

MAILTO is left empty here on purpose in order to disable any email to be send as per documentation:

$ man 5 crontab
..
DESCRIPTION..
       If MAILTO is defined (and non-empty), mail
       is sent to the specified address.   If  MAILTO  is  defined  but  empty
       (MAILTO=""),  no mail is sent.  Otherwise, mail is sent to the owner of
       the crontab.

Then, the following error is throw:

2017-12-18T22:28:06+01:00 cron.info ks397423 crond[11745]: (CRON) STARTUP (1.5.0)
2017-12-18T22:28:06+01:00 cron.info ks397423 crond[11745]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 20% if used.)
2017-12-18T22:28:06+01:00 cron.info ks397423 crond[11745]: (CRON) bad minute (/etc/cron.d/www)

Thanks!

@t8m
Copy link
Member

t8m commented Dec 19, 2017

You can see in the cited manual page that the empty variable is created by using "" i.e. the line should be MAILTO="" and not MAILTO=

@t8m t8m closed this as completed Dec 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants