suppress output of at job
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > suppress output of at job




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    suppress output of at job  
John Galt


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-16-04 10:53 PM

I have this self-scheduling at job:

[belgium.cs] $ cat dobackup.sh
## self-perpetuating at job
at now tomorrow </u/jgalt/dobackup.sh >/dobackup.out 2>&1
...
ls -l backup.tar.gz | mail jgalt

I get output from the job itself and that's all cool. But I see
spurious mail like the below every day (inspite of redirecting the
at).

Your "at" job on belgium.cs
"/var/spool/cron/atjobs/1082446861.a"

produced the following output:

commands will be executed using /bin/bash
job 1090023262.a at Fri Jul 16 20:14:22 2004

Why does this happen and how can I stop it? (Note that the first
invocation redirected the output as well.)

Thanks in advance,
John





[ Post a follow-up to this message ]



    Re: suppress output of at job  
Joe Chung


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-16-04 10:53 PM

johngalt__@hotmail.com (John Galt) writes:

> I have this self-scheduling at job:
>
> [belgium.cs] $ cat dobackup.sh
> ## self-perpetuating at job
> at now tomorrow </u/jgalt/dobackup.sh >/dobackup.out 2>&1
> ...
> ls -l backup.tar.gz | mail jgalt
>
> I get output from the job itself and that's all cool. But I see
> spurious mail like the below every day (inspite of redirecting the
> at).
>
> Your "at" job on belgium.cs
> "/var/spool/cron/atjobs/1082446861.a"
>
> produced the following output:
>
> commands will be executed using /bin/bash
> job 1090023262.a at Fri Jul 16 20:14:22 2004
>
> Why does this happen and how can I stop it? (Note that the first
> invocation redirected the output as well.)
>
> Thanks in advance,
> John

This was just discussed a few months ago.
I think the answer was to do:

exec >/dev/null 2>&1
or
exec >somelogfile 2>&1

as the very first line of your script so that your script does
not produce any output.

See:

http://groups.google.com/groups?th=...
2.cac.psu.edu

Search in groups.google.com using the term
"at command" email

Double quotes are necessary around "at command" to prevent google
from throwing away naked "at" as a common word.

-jc
--
(apply 'concat (reverse (list "com"
(char-to-string 46) "yahoo"
(char-to-string 64) "joechung")))





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 11:04 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register