brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: run-parts --test shows which cron.daily scripts will really run

Cron
~/tips/tip-cron-run-parts-test-daily

run-parts --test /etc/cron.daily

Lists which scripts in a cron directory would be executed without running them.

A script dropped into /etc/cron.daily that never runs is almost always a naming or permission problem.

run-parts --test /etc/cron.daily

--test prints the scripts that would be executed and runs none of them. Debian’s run-parts only accepts file names made of letters, digits, underscores and hyphens, so backup.sh is silently skipped and backup runs. The file must also be executable. Compare the output with ls -l /etc/cron.daily to see which files are missing from the list. The same applies to cron.hourly, cron.weekly and cron.monthly.

Further reading: run-parts(8) manual page

Going deeper: Guide: find out why a Linux service failed, with journalctl

More Cron tips echo 'systemctl restart myapp' | at 03:00 tomorrow 55 23 28-31 * * [ "$(date -d tomorrow +\%d)" = 01 ] && /usr/local/bin/month-end.sh EDITOR=nano crontab -e 30 6 * * mon /usr/local/bin/weekly-report.sh @daily /usr/local/bin/backup.sh All Cron tips (32) All topics

Link