mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
1.3 KiB
1.3 KiB
Cron
TL;DR
Files in /etc/cron.hourly and similar must:
- Be scripts.
Normal crontab files will error out. - Be executable.
If not executable, execution will silently fail. - Match the Debian cron script namespace (
^[a-zA-Z0-9_-]+$).
Files with an extension won't work.
systemctl --enable --now 'crond.service'
journalctl -xefu 'crond.service'
# Validate crontab files.
crontab -T '/etc/cron.d/prometheus-backup'
# List files in given directories.
# Kinda… useless?
run-parts --list '/etc/cron.daily'
# Print the names of the scripts which would be invoked.
# '--report' is *not* available everywhere.
run-parts --report --test '/etc/cron.hourly'
# Manually run crontab files in given directories.
run-parts '/etc/cron.weekly'