From eabdcd3c9de5981ed381a055a8e9b5b6612bed54 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Mon, 10 Apr 2023 19:08:54 +0200 Subject: [PATCH] chore: added cron article to the kb --- knowledge base/cron.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 knowledge base/cron.md diff --git a/knowledge base/cron.md b/knowledge base/cron.md new file mode 100644 index 0000000..dc883ea --- /dev/null +++ b/knowledge base/cron.md @@ -0,0 +1,35 @@ +# Title + +## Table of contents + +1. [TL:DR](#tldr) +1. [Further readings](#further-readings) +1. [Sources](#sources) + +## TL:DR + +Files in `/etc/cron.hourly` and similar need to: + +- be executable, +- match the Debian cron script namespace (`^[a-zA-Z0-9_-]+$`, so script **with an extension** won't work). + +```sh +# Print the names of the scripts which would be invoked. +sudo run-parts --report --test '/etc/cron.hourly' +``` + +## Further readings + +## Sources + +All the references in the [further readings] section, plus the following: + +- [Function of /etc/cron.hourly] + + + + +[further readings]: #further-readings + + +[Function of /etc/cron.hourly]: https://askubuntu.com/questions/7676/function-of-etc-cron-hourly#607974