My appologize for the multiple emails... something went hay-wire with our mail
server yesterday.. sending out multiple emails.
this question has been resolved,.. thanks to the list for the help :)
Mike
Jayakumar Rajagopal wrote:
-Original Message-
From: Mike Blezien [mailto:[EMAIL PROTE
-Original Message-
From: Mike Blezien [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 01, 2004 3:16 PM
To: Perl List
Subject: Check if another script running
Hello,
I need to setup a cronjob to run a script every 2hrs, but if another particular
script(executed via a standard web form),
On Thu, 01 Apr 2004 16:34:11 -0600
Mike Blezien <[EMAIL PROTECTED]> wrote:
> that was my original plan, but I though there maybe a better way
> others may use or suggest :)
>
> Appreciate the feedback,
If you are running this on a Unix/Linux system check out perldoc -f
flock. It enables advisory
On 4/1/2004 3:46 PM, Mike Blezien wrote:
Hello,
I need to setup a cronjob to run a script every 2hrs, but if another
particular
script(executed via a standard web form), on the same machine, is being
executed, I want the cron script "wait" or "sleep();" till the other
script is
finished.
Is th
sorry.. I missed one thing..
This is the right condition line:
ps -ef | grep $0 | grep -v $$ | grep -v grep | grep $0
-Original Message-
From: Jayakumar Rajagopal
Sent: Thursday, April 01, 2004 5:30 PM
To: [EMAIL PROTECTED]; Perl List
Subject: RE: Check if another script running
I
Hi Randy,
that was my original plan, but I though there maybe a better way others may use
or suggest :)
Appreciate the feedback,
Mike
Randy W. Sims wrote:
On 4/1/2004 3:46 PM, Mike Blezien wrote:
Hello,
I need to setup a cronjob to run a script every 2hrs, but if another
particular
script(e
I think your question is more related to unix than perl.
Try something like this in shell script :
program=$0
while ps -ef | grep $0 | grep -v grep | grep $$
do
sleep 10
done
or in perl
$program=$0;
while ( `ps -ef | grep $0 | grep -v grep | grep $$` ) {
sleep 10 ;
}
** I d