At 01:59 AM 5/16/99 -0400, Jimmy C. Thomson wrote:
>How can I get a program to run at a specified time (w/o root access)?
>I tried 
>#% at -m 0730 xclock
>
>but I get an error (at: bad time specification).
>Any ideas?  

When I type this exact string into my Linux host (as either root or an
ordinary user), it accepts it and queues up the job (I do have to type ^D to
signal end of text). Are you sure you entered it exactly as shown here? If
so, it must be a problem specific to your version of at (or at least a
mismatch between your version and mine).

>Alternatly, how can I make a process run for a certain amount
>of time and then exit?

Assuming it's a process not designed to do this itself, the only general way
I can think of is to write a wrapper program that

a. launches the app as a separate process
b. records the pid of the detached process
c. sleeps for the necessary time
d. wakes up and kills the process

This is doable in C or Perl, and probably in a shell script also (but I'm
not much of a shell script programmer, so who knows for sure).

If you want this to happen at a regular time, you could use cron -- start
the process itself using cron, then at a later time, have cron run a scrip
that finds and kills it (of you have ppp-off or some equivalent on your
system you can see how to do this last part in a shell script).

------------------------------------"Never tell me the odds!"---
Ray Olszewski                                        -- Han Solo
762 Garland Drive
Palo Alto, CA  94303-3603
650.328.4219 voice                              [EMAIL PROTECTED]        
----------------------------------------------------------------

Reply via email to