How to change cronjob title?

Once I type "mail" command, I got to see the mail like below:

> 1 daemon Thu Aug 12 17:31 31/938 "Output from cron job "

My question is, how to do change the default title "Output from cron job " to be more customized title?

Thanks.

If you modify your cron entry to send STDOUT and STDERR to mail, then you can specify the subject more descriptively, e.g.

  
15 3 * * 1-5 find $HOME-name core  2>&1 | mail -s "core-find output" <email-address>

Should do it...

Tytalus is right. If you don't use the default action you can customise however you like.
Personally I try to only receive actual problems in root mail.

Okay, will try that. Thanks :slight_smile:

Hi I tested the above, but I still got default title of "Output from cron job ...". Is it possible not to even have that?

Secondly, the subject was being trim 7 character from "Output from cron job". Is it possible to change the view to see the entire subject title once I type "mail"?