Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I do the following to change where mail goes for one specific crontab job in root's crontab (don't sent to root for Do Something job, just send to porklover):

# Make a hambone appear
* * * * * /scripts/hambone.pl

# Eat Ham
* * * * * /scripts/manga_ham.py



#Do something
* * * * * /scripts/chown_abrahams_niece.sh

share|improve this question

No, you can't do it this way. Variable definitions in a crontab are global, and cron uses the same email address for all commands.

One workaround would be to use a local address and redirect based on the input.

Another method to send the output of a job to a different address is to do the sending manually. See How to pipe output from one process to another but only execute if the first has output? for various methods.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.