How do I change the subject of each of my cron jobs?

Multi tool use
Multi tool use
The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


How do I change the subject of each of my cron jobs?



This my crontab file:


# Edit this file to introduce tasks to be run by cron.
MAILTO=richardheyes@gmail.com

0 0 * * * ./backup.sh
0 8,12,16,20 * * * /bin/bash /kunden/homepages/46/d548322256/htdocs/dev/admin/sitemaps/create.sh
0 8,12,16,20 * * * `which php7.1` -q /kunden/homepages/46/d548322256/htdocs/dev/admin/sitemap-html/create.php



As you can see there's a backup shell script, a shell script creates a plain text sitemap file and a PHP command-line script that creates a HTML sitemap.



The resulting sitemaps are viewable here:



https://www.rgraph.net/sitemap.txt



https://www.rgraph.net/sitemap.html



The resulting emails from the cron tasks come through to me as intended but with a subject line like this:


Cron <u78819167@infongp-uk31> `which php7.1` -q /kunden/homepages/46/d548322256/htdocs/dev/admin/sitemap-html/create.php
Cron <u78819167@infongp-uk31> ./backup.sh



Which is just plain ugly. Now I could prevent the email by ensuring the tasks don't produce any output or redirecting the output to /dev/null - but if any errors crop up I'd like to see it.



So my question is:



How can I change these butt ugly subjects to something that looks nicer, on a per cron job basis? Is there an environment variable that I can set from each script that would be used as the subject?









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

3PyMgWm,aBPryPLpCTv,HW
mKm3wjmX8b76hXY5bviSqkKy,ZDJ60koYyl5yrskXsx8PklUY K AH PyLo5Kx2w6 MPW1V9Gpw

Popular posts from this blog

Makefile test if variable is not empty

Will Oldham

Visual Studio Code: How to configure includePath for better IntelliSense results