Hi, first of all let me kindly ask if this is the right place for asking help about bash scripting on Tomato (RAF, by +Victek). Excuse me if it is not... I recently wrote a script that emails me warnings when unknown devices appear in my network. And a lot others...due to I sometimes like to give me a scripting goal and reach it Now, I have some questions/problems and would like to ask for your help. Many scripts are just cronjobs that I schedule running for every minute. Some have long waiting times (sleep) because they must, for example, wait for a PC to wake up, or something similar. I am concerned of the fact that another instance of the same script run by cron will "overwhelm" the older instance (due to my code) if it is still running. I can't avoid the waitings of more than a minute, sometimes, so I always went the way: let's at first check if there are multiple instances of "me", then go on just if there are not. When one of the script run is still in progress to do its duties there's no problem missing a run. But it's not that easy. Scripts run code of course and it seems they are running multiple times to the classic commands I try to use like: Code: CHECK_RUNNING=`ps -w | grep $SCRIPT_NAME | grep -v grep | wc -l` ...even if that's for sure a single instance I can get 2-3 as a response. And I don't really have an idea on how to understand more on this and avoid faulties in my code....for now all my scripts just consider "multiple instance" a response of 4 or more. But I don't feel that's reliable, is it? Can you give me some suggestions on how to do it right? Thank you.