Jump to content

shell_exec();


trp

Recommended Posts

Hi guys,

I am using shell_exec to call a batch script, I don't need the batch to put any output on the page and - as it takes some time to run - I would love it to run in the background, however currently the page hangs untill the script has completed.. can any suggest how to run shell_exec in the background or other methods of running the script without the page hanging?

 

Thanks in advance!

 

TRP

Link to comment
https://forums.phpfreaks.com/topic/198325-shell_exec/
Share on other sites

I forgot to add, I am using Windows Server 2003.

I have found this: http://gnuwin32.sourceforge.net/packages/coreutils.htm

Which adds nohup functionality to Windows, it works fine when run directly from command prompt on the machine.

However, the page calling

shell_exec('nohup something.bat');

still hangs, if you have any further advice that would be great!

 

TRP

Link to comment
https://forums.phpfreaks.com/topic/198325-shell_exec/#findComment-1040840
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.