Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm attempting to kick off a piece of code I wrote when the CPU Usage reaches a specifiable percentage.

Can anyone direct me on how to accomplish this? Thus far I've tried using the task scheduler but to no avail.

I am using Windows Server 2008 R2.

share|improve this question

1 Answer 1

The best way to do this is to use the Windows Performance monitor Or WMI(I forgot what it stands for).

Using Perfmon, you can have it create a custom event when CPU usage gets to 80%, then make task scheduler run your program when it sees your custom event.

This is possible with WMI, but I've never used it. It's possibly a hair more efficient.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.