0

Background

I am calling using exec() from a PHP script to call the PHP executable php.exe in CLI mode to run a script.

The command I am sending looks like:

exec('/path/to/php.exe /path/to/myscript.php');

The issue is that the process that is lunched is using 99% - 100% of the CPU.

Is there a way to set a priority for the process when launching the script?

3
  • Is this causing performance issues? Are there other processes vying for CPU time? If not, there's really nothing you can do to resolve this.
    – EEAA
    Mar 10, 2014 at 19:19
  • Yes, it's causing temporary timeouts from the Apache server running on the same machine. Mar 10, 2014 at 19:20
  • Oh, cripes...you're on windows. Well good luck with that. I haven't a clue. :)
    – EEAA
    Mar 10, 2014 at 19:22

1 Answer 1

0

Some of the answers suggest running the script in Low priority.

start /low.

Any other ideas are welcome.

1
  • That's probably about as good as you're going to get, and it should set the process to only take CPU cycles that aren't being used by a process with a higher priority. Mar 10, 2014 at 21:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .