Run program at specific temperature then close it when temp. drops.

DoubleA7

New Member
I want to run a program when my cpu hits 90°C (Which will rev up my fans) then close it when temp decreases to let's say 80°C.

How would I go about this?
 

Martin

HWiNFO Author
Staff member
Use the alarms in sensors. It allows to configure several criteria and actions including running any program.
 

DoubleA7

New Member
Martin said:
Use the alarms in sensors. It allows to configure several criteria and actions including running any program.
Alerts?

How do I set:

If value >= 90 run program

If Value < 70 close program

I've done this for >= 90 but I don't know how to set the below 70 function.
http://puu.sh/nTzY0/663418b67c.png

I could use another variable - ex core max to set this but is it possible to set it using only 1 alarm set?
 

Martin

HWiNFO Author
Staff member
Setting multiple criteria for one alarm is not possible, but depending on the program run it might be called as long as the >= 90 is reached. The program run will however need to terminate after performing the operation and not remain running.
Another alternative might be to use a different temperature like "IA Cores" which is very close to CPU Package and when < 70 run "taskkill /IM program_name" or "taskkill /IM /F program_name" to terminate your program. Use the /F switch if the program will not terminate without using this switch.
 

DoubleA7

New Member
The only problem with this is that it will run the program every time the temperature is lower than 70, which runs it every few seconds, is there a way to run it only once?

Like this:

if the temperature increases over 90 run fan cooler

then only if temperature decreased only after it increased run terminate program

I've set up 2 batch files, one opens the program (Only allows 1 copy of program to run at once) and the other closes it (if it finds it running)

But I would not like it to run the close program bat for every temperature below 70.
 

Martin

HWiNFO Author
Staff member
You're right, that would run the <70 C task always so it's not a good solution.
So currently only the 1st proposed solution is possible.
 

DoubleA7

New Member
Does Hwinfo return values for use in a batch script?

That way I can run if statements depending on the temperature whilst the script stays running.
 

Martin

HWiNFO Author
Staff member
Yes, it can pass the current temperature value as argument to the script - it's described on the alarms page.
 
Top