CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 how can i fork a background script?

Print topic Send  topic

Author Message
ioman

Posts: 4
Posted: 11/20/2007, 2:28 PM

I have some custom code that creates a db entry. After that happens, I need to fork to an external command that will sleep for a few minutes then execute some stuff.

I've tried a simple:

exec("/usr/bin/php /path/to/script &");

within my custom code but it does not return the user web session until the external script has finished. Anyone know if there's a different way I should be doing this?

Thanks in advance

Eric

View profile  Send private message
ioman

Posts: 4
Posted: 11/20/2007, 2:39 PM

D'oh! I forgot to discard output. It totally works. My bad.

exec("/usr/bin/php /path/to/script > /dev/null &");

Thanks.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.