Re: Run script as often as possible

2004-09-29 Thread Jacob Larsen
mysc:2345:respawn:/path/to/myscript What does the 'mysc' do? id:runlevels:action:process "id is a unique sequence of 1-4 characters which identifies an entry in inittab" from `man inittab` -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROT

Re: Run script as often as possible

2004-09-29 Thread Tom Allison
Dave Carrigan wrote: On Tue, Sep 28, 2004 at 11:23:15AM +0200, Jacob Larsen wrote: I have a script that I'd like to run as often as possible. mysc:2345:respawn:/path/to/myscript What does the 'mysc' do? -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Conta

Re: Run script as often as possible

2004-09-28 Thread Kevin Mark
On Tue, Sep 28, 2004 at 11:23:15AM +0200, Jacob Larsen wrote: > I have a script that I'd like to run as often as possible. what does that mean? as many instances as possible until the cpu load in maxed out? > The script may only run in 1 instance. And that would be ... > My idea is to have a cron

Re: Run script as often as possible

2004-09-28 Thread Jacob Larsen
mysc:2345:respawn:su - someuser -c /path/to/myscript Thanks! And I guess if I want to write output to a file I do this: mysc:2345:respawn:su - someuser -c /path/to/myscript >> /var/log/myscript.log -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [E

Re: Run script as often as possible

2004-09-28 Thread Dave Carrigan
On Tue, Sep 28, 2004 at 04:49:49PM +, Adam Funk wrote: > That runs the script as root, right? If you wanted to run it with as > another user, would you just stick a bit of sudo in that inittab > entry? Sure: mysc:2345:respawn:su - someuser -c /path/to/myscript -- Dave Carrigan Seattle, WA

Re: Run script as often as possible

2004-09-28 Thread Adam Funk
On Tuesday 28 September 2004 16:30, Dave Carrigan wrote: > On Tue, Sep 28, 2004 at 11:23:15AM +0200, Jacob Larsen wrote: >> I have a script that I'd like to run as often as possible. >> The script may only run in 1 instance. >> My idea is to have a cron script to start it once every hour. The >> s

Re: Run script as often as possible

2004-09-28 Thread Dave Carrigan
On Tue, Sep 28, 2004 at 11:23:15AM +0200, Jacob Larsen wrote: > I have a script that I'd like to run as often as possible. > The script may only run in 1 instance. > My idea is to have a cron script to start it once every hour. The script > should write a run file, and if the run file exists, exit

Re: Run script as often as possible

2004-09-28 Thread Jacob Larsen
I have a script that I'd like to run as often as possible. The script may only run in 1 instance. My idea is to have a cron script to start it once every hour. The script should write a run file, and if the run file exists, exit. Is this the best way? yeah. Accpeted method is to write a lock file

Re: Run script as often as possible

2004-09-28 Thread Blake Swadling
On Tue, 2004-09-28 at 19:23, Jacob Larsen wrote: > I have a script that I'd like to run as often as possible. > The script may only run in 1 instance. > My idea is to have a cron script to start it once every hour. The script > should write a run file, and if the run file exists, exit. > Is this t

Run script as often as possible

2004-09-28 Thread Jacob Larsen
I have a script that I'd like to run as often as possible. The script may only run in 1 instance. My idea is to have a cron script to start it once every hour. The script should write a run file, and if the run file exists, exit. Is this the best way? Thanks, Jacob -- To UNSUBSCRIBE, email to [EM