Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* where does 'at' store times
@ 1996-04-13  4:00 Jay Olson
  1996-04-15  4:00 ` Phil Edwards
  0 siblings, 1 reply; 2+ messages in thread
From: Jay Olson @ 1996-04-13  4:00 UTC (permalink / raw)



I have a (Tk/Tcl) application which needs to find the times
when 'at' jobs of other users are to be run. I can find the
jobs by looking in /var/spool/cron/atjobs, but I don't know
when they are going to run.

I have tried a setuid C program which runs the Tk/Tcl program
(i.e. a stripped down version of tkAppInit.c which only runs
a specific tcl program). When the tcl program execs 'atq' or
'at -l', only jobs for the user running the program are shown,
so it looks like 'at' seems to know that it is not being run by
root.

I am using OSF/1 version 3.2c, Tcl version 7.4 and Tk version 4.0.

Thanks in advance for any help.

	- Jay Olson
	Triton Software Group Ltd.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: where does 'at' store times
  1996-04-13  4:00 where does 'at' store times Jay Olson
@ 1996-04-15  4:00 ` Phil Edwards
  0 siblings, 0 replies; 2+ messages in thread
From: Phil Edwards @ 1996-04-15  4:00 UTC (permalink / raw)


[cc'd to poster]


With <4kn6b1$m38@atlas.tncnet.com>,
it seems Jay Olson (jjo@triton.com) sez:

+ I have a (Tk/Tcl) application which needs to find the times
+ when 'at' jobs of other users are to be run. I can find the
+ jobs by looking in /var/spool/cron/atjobs, but I don't know
+ when they are going to run.

The filenames themselves define the job characteristics.  Check out
the man page for at(1):

#  
#    Job numbers are specified as follows:
#  
#    user.xxxxxxxxx.y
#  
#    The user argument identifies the user who scheduled the job.  xxxxxxxxx is
#    a 9-digit number (encoded time for the job).  y indicates the job type or
#    queue name as follows:
#  
#    Argument  Job Type
#  
#    a         at job
#  
#    b         batch job
#  
#    e         ksh job
#  
#    f         csh job
#  

If you look inside the directory, you'll find that the job files
are of that type.  Personally, I wouldn't be surprised if the
"encoded time" wasn't simply the result of a call to time(2), or
maybe some ctime conversion with the seconds field stripped.


Luck++;
Phil

-- 
#include<std/disclaimer.h>               The gods do not protect fools. Fools
finger pedwards@gamma.cs.wright.edu      are protected by more capable fools.
email pedwards@valhalla.cs.wright.edu                            -Larry Niven



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1996-04-15  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-04-13  4:00 where does 'at' store times Jay Olson
1996-04-15  4:00 ` Phil Edwards

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