Re: Run script as often as possible
From: Dave Carrigan (dave_at_rudedog.org)
Date: 09/28/04
- Previous message: H. S.: "Re: Idea"
- In reply to: Jacob Larsen: "Run script as often as possible"
- Next in thread: Adam Funk: "Re: Run script as often as possible"
- Reply: Adam Funk: "Re: Run script as often as possible"
- Reply: Tom Allison: "Re: Run script as often as possible"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 28 Sep 2004 08:28:03 -0700 To: debian-user@lists.debian.org
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
-- Dave Carrigan Seattle, WA, USA dave@rudedog.org | http://www.rudedog.org/ | ICQ:161669680 UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL Dave is currently listening to Creedence Clearwater Revival - Travellin' Band (Chronicle)
-- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- application/pgp-signature attachment: Digital signature
- Previous message: H. S.: "Re: Idea"
- In reply to: Jacob Larsen: "Run script as often as possible"
- Next in thread: Adam Funk: "Re: Run script as often as possible"
- Reply: Adam Funk: "Re: Run script as often as possible"
- Reply: Tom Allison: "Re: Run script as often as possible"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|