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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run script in background

Status
Not open for further replies.

KryptoS

Programmer
Feb 7, 2001
240
BE
Hello,

How can I execute a script in the background. I don't want to wait until it's finished.

I tried passthru("myscript.php"). I worked, but I still need to wait until the script is finished before I can work on...

any help would be appriciated.

visit my website at
 
ok, how can I do that? can you help me with this?

this is what I have:

passthru("/usr/local/bin/php /home/admin/domains/myweb/app/jobs/script.php");

visit my website at
 
Hi

Doh. I thought you already done the obvious. Add an ampersand ( & ) after the command :
Code:
passthru("/usr/local/bin/php /home/admin/domains/myweb/app/jobs/script.php > /dev/null 2> /dev/null [red]&[/red]");

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top