Humus numericus

Aller au contenu | Aller au menu | Aller à la recherche

R, Spip et autres

Mot-clé - cron

Fil des billets

mercredi 10 février 2010

Don't put a dot in your cronjobs names !

So you just setup a wonderful new cron job on your server that will make your life easier and your family happy. You put it in your /etc/cron.d in a file called but… your job is never launched.

You checked the permissions, the crontab syntax, ran the script manually, evertything is fine. You checked your syslog, but nothing is reported on it, not even the fact that the job is started. What’s the problem ?

The answer is in the run-parts manual page :

If the —lsbsysinit option is not given then the names must consist entirely of upper and lower case letters, digits, underscores, and hyphens.

So if you put a dot in your cron job name, it will not be run at all. Rename it to wonderfulcronjob-sh or just wonderfulcronjob and everything should work fine.

Thanks to birdy for finding this one…