Re: Run script as often as possible
From: Adam Funk (a24061_at_yahoo.com)
Date: 09/28/04
- Previous message: Joost Witteveen: "Re: keeping woody"
- In reply to: Dave Carrigan: "Re: Run script as often as possible"
- Next in thread: Dave Carrigan: "Re: Run script as often as possible"
- Reply: Dave Carrigan: "Re: Run script as often as possible"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 16:49:49 GMT To: debian-user@lists.debian.org
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
>> script should write a run file, and if the run file exists, exit.
>> Is this the best way?
>
> Run it from init by putting an entry into your inittab. As soon as it
> exits, init will respawn it. The upside is that there is no need to do
> locking or process synchronization. The following inittab entry would
> work.
>
> mysc:2345:respawn:/path/to/myscript
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?
-- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- Previous message: Joost Witteveen: "Re: keeping woody"
- In reply to: Dave Carrigan: "Re: Run script as often as possible"
- Next in thread: Dave Carrigan: "Re: Run script as often as possible"
- Reply: Dave Carrigan: "Re: Run script as often as possible"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|