Operating System - HP-UX
1847893 Members
1830 Online
104021 Solutions
New Discussion

AT Jobs - Scheduling time in seconds...

 
Lee Harris_5
Valued Contributor

AT Jobs - Scheduling time in seconds...

This post is in relation to the recently closed thread by Ranjit about wanting to schedule a job to run every 20 seconds.

A number of people replied to him saying that scheduling a job using AT it was not possible to specify seconds...

I am curious about this, because the man page for the command on 11.11 seems to say otherwise. Maybe I'm not reading it right...i've only had two cups of coffee so far so there is every possibility :-)

man at

...

-t spectime Define the absolute time to start the job.

spectime A date and time in the format:

[[CC]YY]MMDDhhmm [ . ss ]

where the decimal digit pairs are
as follows:

CC The first two digits of the
year (19, 20).
YY The second two digits of the
year (69-99, 00-68). See
WARNINGS.
MM The month of the year (01-12).
DD The day of the month (01-31).
hh The hour of the day (00-23).
mm The minute of the hour
(00-59).
ss The second of the minute
(00-61).
5 REPLIES 5
Mobeen_1
Esteemed Contributor

Re: AT Jobs - Scheduling time in seconds...

Lee,
Yes the "man at " that you posted is what we or rather i have access to.

Where does it say from your man at output that its possible to use

at to schedule a job to run every xx secs ?

I am also running short of caffeine :), may be we should drink coffee and get back to this thread :)

Tell me what makes you think that you could do it after reading the man, then i will revert back and explain :)

regards
Mobeen
Leif Halvarsson_2
Honored Contributor

Re: AT Jobs - Scheduling time in seconds...

Hi,

Another possible solution is to use init (inittab). I don't know is a such use of inittab is recommended but, it works.
Mobeen_1
Esteemed Contributor

Re: AT Jobs - Scheduling time in seconds...

Leif,
Thats interesting, could you please elaborate little more on the use of inittab ?

rgds
Mobeen
Leif Halvarsson_2
Honored Contributor

Re: AT Jobs - Scheduling time in seconds...

Hi,

I just created an entry in the inittab like:

abc1:3456:respawn:/tmp/abc1

then, a simple script:

sleep 20
echo `date` >>/tmp/abc1.log


and, last do a "init q" (reread inittab)

It seems to woork.

Mobeen_1
Esteemed Contributor

Re: AT Jobs - Scheduling time in seconds...

Leif,
Thanks...no wonder you are an ITRC Pharoh :)
Thanks again

rgds
Mobeen