centre{source}
INTERACTIVE AGENCY
run-parts
Debian has some handy directories for dropping scripts into regular cron rotation, /etc/cron.hourly/, /etc/cron.daily/, /etc/cron.weekly/ and /etc/cron.monthly/.
I spent a long time wondering (but never really looking) into why certain update scripts I had in there weren’t running. Turns out these scripts are called via “run-parts”, and, well, turns out it’s my stupid fault for not reading the manpage, which makes it pretty clear:
RUN-PARTS(8):
run-parts runs a number of scripts or programs found in a
single directory directory. Filenames should consist
entirely of upper and lower case letters, digits, underĀ
scores, and hyphens. Subdirectories of directory and
files with other names will be silently ignored.
My script’s name? “check-apt.sh”, which puts it into the “silently ignored” category. Lesson learned — always read the man pages, kids.
