note 11800 added to exec

From: Date: Wed, 07 Mar 2001 16:24:41 +0000
Subject: note 11800 added to exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-12001@lists.php.net to get a copy of this message
If you want to use exec() to start a program in the background, and aren't worried about load (because the program can only run one instance or you will manually stop it before starting it again) you can use either of these methods to leave it running in the background indefinately. Add set_time_limit(some ridiculously huge number) to your script, cause even though it won't stop it, it does seem to allow it to run longer than usual. ...or... exec("nohup *command* 1>/dev/null/ 2>&1 &"); Thanks to the guys on the php list for helping me solve this unusual(?) problem. http://www.php.net/manual/en/function.exec.php

« previous php.notes (#12001) next »