Currently, I tried to prevent an onlytask.php script from running more than once:
onlytask.php
$fp = fopen(\"/tmp/\".\"onlyme.lock\", \"a+\"); if (flock($fp,
You can use lock files, as some have suggested, but what you are really looking for is the PHP Semaphore functions. These are kind of like file locks, but designed specifically for what you are doing, restricting access to shared resources.