Humus numericus - Mot-clé - cron
2019-05-09T20:00:29+02:00
urn:md5:c2531a830c9d2a52c5500061b4d5077e
Dotclear
Don't put a dot in your cronjobs names !
urn:md5:2edc0160261bd574f96664f96d6e3f09
2010-02-10T17:23:00+01:00
2010-03-08T17:53:43+01:00
Juba
Linux, Debian, etc.
cronsysadmin
<p>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 <code>/etc/cron.d</code> in a file called <code>wonderfulcronjob.sh</code> but… your job is never launched.</p>
<p>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 ?</p>
<p>The answer is in the <code>run-parts</code> manual page :</p>
<blockquote><p>If the —lsbsysinit option is not given then the names must consist entirely of upper and lower case letters, digits, underscores, and hyphens.</p></blockquote>
<p>So if you put a dot in your cron job name, it will not be run at all. Rename it to <code>wonderfulcronjob-sh</code> or just <code>wonderfulcronjob</code> and everything should work fine.</p>
<p>Thanks to <a href="http://arnaud.luquin.info/" hreflang="fr">birdy</a> for finding this one…</p>