" . $path . "/log/automailer7.stdout+err 2>&1 &"; $ausgabe = system($cmd, $result); } // START SCRIPT // $path = getParameterValue("0", "PATH_DOCROOT", "0"); $dirName = dirname(__FILE__); $dirName = str_replace("\\", "/", $dirName); $lastSlashPos = strrpos($dirName,"/"); $path = substr($dirName, 0, $lastSlashPos); $logFile = getParameterValue("0", "AUTOMAILER_LOGFILE", "0"); $constAutomailerSleeptime = getParameterValue("0", "AUTOMAILER_SLEEP_TIME", "0"); if ($constAutomailerSleeptime == "" || !is_numeric($constAutomailerSleeptime) || $constAutomailerSleeptime < 2 || $constAutomailerSleeptime > 9) : $constAutomailerSleeptime = 4; endif; // Endless loop while (TRUE): // Set execution time for keepalive $currentTime = getDateTime("0"); updateStmt("keepalive", "ka_process", "automailer7", array("ka_lastexecutiontime", $currentTime),""); if (true) : call_automailer7(); endif; sleep(10); endwhile; // Endless loop ?>