Forum Moderators: coopster

Message Too Old, No Replies

PHP to generate

         

martindell

12:23 pm on Apr 20, 2004 (gmt 0)

10+ Year Member



I'm running some pretty hefty maintenance PHP scripts on a LAMP setup that sometimes take 4h + to complete.

The problem is that if I close the browser window or exit the terminal window while the script is running, the process is killed.

I'm looking for a solution whereby I can launch a PHP script and close / exit whatever window I used to make it.

Cron works in this situation, but I don't run the script at predefined times so I would have to setup a Cron tab everytime I run the script.

Any suggestions?

ukgimp

12:28 pm on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



can you execute the script from the command line

A two minute look
[phpfreaks.com...]

gethan

12:44 pm on Apr 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



try: at (man at)

at now + 1 minutes

> /usr/local/php yourscript.php
> ctrl+D

HTH

martindell

8:29 am on Apr 21, 2004 (gmt 0)

10+ Year Member



Perfect! It took a while to find AT and get it started but it is just what I was looking for. Thanks for your help