I have multiple cron job entries configured under a single account:
0 0 * * * /foo/foo.sh 0 2 * * * /foo/foo2.sh 0 4 * * * /foo/foo3.sh
Right now, if any of these encounter an error, an email is sent to the user account. Can I configure cron to send a notification to a different email address depending on which entry encounters the error?
For example, if an error occurs while running
/foo/foo.sh send to email@example.com. If an error occurs while running
/foo/foo2.sh send to firstname.lastname@example.org.
I know I can set
MAILTOemail@example.com but I think that's for ALL cron entries (for the account I'm logged in as)... I don't think that's a per-entry setting.
Hopefully this makes sense. Thanks. :-)