Skip to content

Cron

Cron with error mails

Install chronic

apt install moreutils

/etc/cron.d/01-example-cron

#!/usr/bin/env bash
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin/usr/local/bin
MAILTO=root,my-mail@example.org

0 0 * * * root chronic /usr/local/bin/backup