linux AT to send mail to another user

I use the  at  command to run a job. Since the user Patty has logged off, it automatically creates a mail to the user. The Patty never reads her mail. Is there a way to send the mail to another user instead? I know I can use the -M to suppress the mail, but someone else (penguin) still needs to know the job has run

Patty runs the command
at -f run_nightly_job now + 3 hours

user penguin needs to get the mail
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pipe the output to mailx to send to multiple users...

at -f run_nightly_job now + 3 hours | mailx -s "Nightly Job" Patty Penguin

You MIGHT still need the -M flag to suppress a duplicate email to the submitter... Try it & see!
penguins_ruleAuthor Commented:
Is there a way to get the contents of the original mail which has the results of the nightly job to be sent to Penguin?

Or a way to forward all mail from Patty to Penguin?
You can use a .forward file...

Check out the vacation command in your Linux manual...
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Why dont you include "logger" command in your script and let interested read the log?
Nick UpsonPrincipal Operations EngineerCommented:
you can add a line to /etc/aliases (don't forget to run newaliases afterwards) which sends all mail from Patty to Penguin

patty: penguin

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
penguins_ruleAuthor Commented:
adding line in /etc/aliases gives me what i'm looking for.

Patty has an at which is scheduled for next Monday. Will the mail automatically go to penguin, or does the at command have to be killed and restarted?
Nick UpsonPrincipal Operations EngineerCommented:
as soon as the "newaliases" command is run, all email will be redirected
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.