tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Lucio Chiappetti <lucio () ifctr ! mi ! cnr ! it>
To: tru64-unix-managers
Subject: SELF-SUMMARY: at and batch quirks
Date: Tue, 05 Sep 2000 16:55:13 +0000	[thread overview]
Message-ID: <96817305816219.tru64-unix-managers.marc@archive.invalid> (raw)

I have a DU 3.2 (oh yes it has to be left alone) system on which in some
occasional CGI script I used the following construct to get rid of temporary
files :

at now + 1 minute <<END
rm -f /tmp/quanti.html
END

On such system (because I did not by purpose install the Y2K patches)
I get an "at : bad year" error.

I replaced the construct with 

batch <<END 
sleep 60
rm -f /tmp/quanti.html

and the construct works. Only I receive the following very curious message
after the successful execution of the batch (the curious thing is that the
message mentions "pine" ! is this message generated by batch, or by pine (yes
I do use pine for mail) receiving some illegal stuff ?)

-------------------------------------------------------------------------
body of message from root follows
-------------------------------------------------------------------------
Cannot find terminal.
Can't access terminal or input is not a terminal. Redirection of
standard input is not allowed. For example "pine < file" doesn't work.
^G

*************************************************
Cron: The previous message is the standard output
      and standard error of one of your cron commands.
-------------------------------------------------------------------------

I tried various options of redirection (e.g. batch << END >& /dev/null)
but still I receive the mail.

I tried the same construct on a Tru64 5.0 system, and the curious thing there
is that I *ALWAYS* receive a mail message from ANY "batch" command saying
something like this :

at: Job prova.968172211.b was run.

I cannot get rid of it.

Finally I found it ! On both systems "batch" is a script aliased to
at -qb -m

It's the -m switch which is carved in stone there !

So finally my construct works as follows

at -qb <<END 
sleep 60
rm -f /tmp/quanti.html

----------------------------------------------------------------------------
Lucio Chiappetti - IFCTR/CNR - via Bassini 15 - I-20133 Milano (Italy)      
For more info : http://www.ifctr.mi.cnr.it/~lucio/personal.html             
----------------------------------------------------------------------------

                 reply	other threads:[~2000-09-05 16:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox