Managing cron and similar E-Mails from headless systems

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


On Feb 17, 2017 06:14, "Chris Green" <cl at isbd.net> 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/ isbd.uk:
.syncmisc/odin/

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: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20170217/cc2362e6/attachment.html>


More information about the ubuntu-users mailing list