How to start a program when CPU percent reaches X

Solution 1:

Never did it, but easiest way would be by using alert in perfmon.

As you can see below, you can run a script when the action happen.

Select the Action tab, shown in Figure 3-18. You can now specify any of the following actions to happen when an alert is triggered: Log An Entry In The Application Event Log Creates log entries for alerts.

Send A Network Message To Sends a network message to the computer specified.

Run This Program Sets the complete file path of a program or script to run when the alert occurs.

More info there to set the alert

after in your script you could run it that way;

procmon /Quiet /Minimized /BackingFile log.PML
TIMEOUT /T 120
procmon /Terminate