rsiedl has asked for the wisdom of the Perl Monks concerning the following question:
does that look like a good way to start or can someone suggest something better?#!/usr/bin/perl use strict; while (1) { my $program = `ps aux | grep PROGRAM`; #some code to determine if the result shows a running program and se +t $program to 1 if ($prgram) { sleep 60; } else { `PROGRAM`; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: running program?
by Zaxo (Archbishop) on May 25, 2006 at 02:34 UTC | |
|
Re: running program?
by Tanktalus (Canon) on May 25, 2006 at 03:55 UTC | |
|
Re: running program?
by ioannis (Abbot) on May 25, 2006 at 03:21 UTC | |
|
Re: running program?
by jhourcle (Prior) on May 25, 2006 at 02:04 UTC | |
by dsheroh (Monsignor) on May 25, 2006 at 03:22 UTC | |
by Fletch (Bishop) on May 25, 2006 at 03:35 UTC | |
|
Re: running program?
by sgifford (Prior) on May 25, 2006 at 05:29 UTC | |
|
Re: running program?
by izut (Chaplain) on May 25, 2006 at 13:24 UTC | |
|
Re: running program?
by cdarke (Prior) on May 25, 2006 at 07:19 UTC |