How to check "at" status

How to check "at" status

am 02.10.2007 10:18:16 von moonhk

Hi All
We are using "at now Database.down" (at 03:00) to shutdown a database.
But today, we found that the shutdown process still running (after
09:30). Do you know how to check the "at" command complete or not ?
How to get the at return code ?


moonhk

Re: How to check "at" status

am 02.10.2007 14:16:25 von Bill Marcum

On 2007-10-02, moonhk wrote:
> Hi All
> We are using "at now Database.down" (at 03:00) to shutdown a database.
> But today, we found that the shutdown process still running (after
> 09:30). Do you know how to check the "at" command complete or not ?
> How to get the at return code ?
>
Make sure the command produces output, and wait for the email.

Re: How to check "at" status

am 03.10.2007 10:22:35 von bonomi

In article <1191313096.195645.264970@w3g2000hsg.googlegroups.com>,
moonhk wrote:
>Hi All
>We are using "at now Database.down" (at 03:00) to shutdown a database.
>But today, we found that the shutdown process still running (after
>09:30). Do you know how to check the "at" command complete or not ?
>How to get the at return code ?

You're asking the wrong question. And probably doing the wrong things for
what you "really want to" accomplish.

The 'at' command completes when it has successfully queued the job for
processing.

The 'return code' for that at command indiecates only whether or not the
job was _queued_ successfully.

UNIX itself provides no means for retrieving/checking the exit-code status
of anything submitted a queue for processing.

If you want monitorig/status capabilities, *YOU* have to build the appropriate
'smarts' into the 'at'/'batch' job that you submit. this can be as 'trivial'
as echo(1) a 'starting' line to a known file at the beginning of the task
and a 'done' line to that same file as the last line of the task. Then you
simply 'cat' that file to check on job status.

`