note 23862 added to function.ignore-user-abort

From: Date: Tue, 30 Jul 2002 13:42:50 +0000
Subject: note 23862 added to function.ignore-user-abort
Groups: php.notes 
Request: Send a blank email to php-notes+get-33991@lists.php.net to get a copy of this message
In order to run a php script over several hours, days and so on and ignore the users interactivity, it is better to register a cronjob on linux servers or use a taskmanager on other OS, than use ignore_user_abort(true); a sample: ======= $file="/etc/test.cron"; #contains the cronjobs like 0 * * * * php -f /usr/local/httpd/htdocs/php/mail.php /dev/null 2>&1 system("crontab $file 2>&1"); #set file into crontab system("crontab -r 2>&1"); #register actual crontab The php script mail.php will now be executed every hour :) -- http://www.php.net/manual/en/function.ignore-user-abort.php http://master.php.net/manage/user-notes.php?action=edit+23862 http://master.php.net/manage/user-notes.php?action=delete+23862 http://master.php.net/manage/user-notes.php?action=reject+23862

« previous php.notes (#33991) next »