Hmm, can I presume that writekeyscmdline is the name of your script? , without bending my head too much, it looks like your backtick command to ps will not only discover any previously running invocations , but also the PRESENT invocation.
Check if the PID in $result is the same as $$ , ie the PID of the running script. If so - it will be sleep 60'ing because it's running. if that makes sense.
In reply to Re: Script doesn't exit when run from cron.
by submersible_toaster
in thread Script doesn't exit when run from cron.
by brewmaker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |