4

AIX - "prevent script from running twice" issue

view full story
linux-howto

http://www.unix.com – I know about standard "ps ..|grep .. | grep -v grep" solution, but... this is different issue I have encountered in several companies I worked for. And I see this only for AIX - not HP, not Solaris, not Linux. Korn shell script is scheduled in the background (via cron /via Tivoli Scheduler or alike) It has logic in it to make sure only one instance running at the time using the same "ps ..|grep .. | grep -v grep". For the most of the times it works just fine. But once in a while script detects that another instance is already running and exits. Trying to research this, (HowTos)