Managing cron and similar E-Mails from headless systems

W Scott Lockwood III vladinator at
Fri Feb 17 12:24:10 UTC 2017

On Feb 17, 2017 06:14, "Chris Green" <cl at> wrote:

No use, I want an *ordinary* cron job to identify itself.

E.g. I have backup jobs running on one of my headless computers with
cron entries like:-

    20 1 * * * rsync -a --exclude '*.pyc' /home/chris/

When something goes wrong I want to be able to identify where the mail
from cron came from.

Wrap that cron in a script. Have the script echo the identifier of your
choice before it does anything else.

echo "This cron is running on Fred, the RPI system providing DNS and DHCP.
It lives under your couch."

Or something similar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-users mailing list