A great way to never have your PHP script fail

April 8, 2006

Hi everyone,

A little while ago I wrote a post about how to prevent your cron job from failing. A comment was posted suggesting the use of the PHP function ignore_user_abort(true). This is a great idea; anyone who is running a PHP script should put this:

ignore_user_abort(true);

as the first line in their script. This way, if your script takes longer than 60 seconds, and WebBasedCron closes the connection, the script will continue to run on your server.

Thanks,
George
WebBasedCron

Entry Filed under: WebBasedCron. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Welcome!

Welcome to the official Web Based Cron blog. Visit Web Based Cron for all your cron hosting needs. If you have any questions, let us know, we're nice people!

Feeds

Recent Posts

Archives

Top Posts

Pages

Web Based Cron Twitter

Enter your email address to subscribe to the WBC blog and receive notifications of new posts by email.

Search the WBC Blog