I have a perl script, which is run every minute by a cron. Sometimes the script may take longer than 1 minute to complete. In such instances I want the next script (started by the cron) to exit.
To achieve this, currently I do a "ps -ax", from perl space, to find if the process is already running, if true then the script quits. This is more of a hack. How can I solve this problem, more gracefully ?