Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running server program from web site problem

Status
Not open for further replies.

xiaoleiqq

Programmer
Aug 30, 2006
43
US
Hi,

I have a server program running that waits for files arrive and that program needs to be invoke from the web browser.
That waiting time might be up to couple hours, so I have my code as follow,
...
`perl -w wait.pl &`
...
which I think it will run (since I put a & there) but it turns out that is not the case, I think the program terminates as soon as I close the web-browser. (I have no way to check the process status of web-initial process).

Anything I did wrong or I did not aware of? Thanks.
 
Rather than keeping the script running, wouldn't you be better off with a CRON job?
 
It probably will jump to the same problem when I start the Cron from the web-browser. I can't start Cron from the console since the script needs information from the browser.
In the script i use sleep for about 1 hour and check the existence of file,
 
From what I read about cron is: it schedule to run a script, but I need the information from web browser to run the script, so I feel like Cron is not what I need. Did I mistaken something here? I am not quite familiar with Cron
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top