1

In the SuSE /etc/crontab the entry to run the cron.{hourly,daily,monthly,weekly} scripts is coded as:

-*/15 * * * *   root  test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1

Notice that the very first character of the specification is a dash character (-), and this is NOT a typo.

Can somebody explain what the time spec -*/15 means?

BTW, the stuff seems to be running fine.

2 Answers 2

9

It says the following in the man page for the crontab file (man 5 crontab):

If the uid of the owner is 0 (root), he can put a "-" as first character of a crontab entry. This will prevent cron from writing a syslog message about this command getting executed.

0

I would like to mention that this seems to be SuSE specific use case. Vixie Cron on several other systems (I tested redhat, debian, gentoo and FreeBSD) do NOT support this special use case. Instead of silencing the cronjob from producing a syslog message, the leading dash silenty disables the entire job, so be careful when using it!

You must log in to answer this question.

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