Hi,
how do I find the previous instance of my perl script?
The script is setup as a cron job and I don't want more than one copy of the script running at the same time..
the method i'm using now is that the script checks for a file.. if it exists then it exits otherwise it touches file when the script starts and removes it when done.. this works but there are many problem with this method :/
Is there any other way of doing it? using the pid ($$)? Not sure but can it be done by capturing the ps output?
any help will be appreciated.
---
cheers!
san.
how do I find the previous instance of my perl script?
The script is setup as a cron job and I don't want more than one copy of the script running at the same time..
the method i'm using now is that the script checks for a file.. if it exists then it exits otherwise it touches file when the script starts and removes it when done.. this works but there are many problem with this method :/
Is there any other way of doing it? using the pid ($$)? Not sure but can it be done by capturing the ps output?
any help will be appreciated.
---
cheers!
san.