Earlier anacron jobs

For whatever reason, anacron is set to run its daily jobs at 7:30 in the morning:

# /etc/cron.d/anacron: crontab entries for the anacron package

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

30 7    * * *   root	start -q anacron || :

The first time I encountered that was when I was working at that time of day and noticed the sluggishness of my machine. It seemed that locate was the heavyweight process, so I changed anacron to run at 4:30 a.m, modifying the last line in the file:

30 4    * * *   root	start -q anacron || :
Advertisements

No dots in cron scripts?

I added a little script to /etc/cron.daily, sayhello.sh, while I sorted out how to integrate my backup script (tresync) into the list of cron jobs run daily.

The odd thing is, the script never ran. I could run it as “sudo /etc/cron.daily/sayhello.sh“, but it didn’t run with the rest of the cron jobs.

Lo and behold, I found the answer, which is actually on the man page for run-parts:

If neither the –lsbsysinit option nor the –regex option is given then the names must consist entirely of ASCII upper- and lower-case letters, ASCII digits, ASCII underscores, and ASCII minus-hyphens.

Which means: you cannot have a dot in the file name.

That seems quite counterintuitive, but perhaps there is a reason that I just don’t understand.