topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 8:10 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Run application on low CPU level?  (Read 40705 times)

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
IDEA: Run application on low CPU level?
« on: August 27, 2006, 02:59 PM »
I'm on the scrounge again.  Does anyone know of software (preferably free or low cost) which will run an application when the CPU level and/or disk activity falls below a certain limit or when the keyboard /mouse is idle (but able to set idle time in seconds rather than minutes.

Thanks, Jeff

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #1 on: August 27, 2006, 09:26 PM »
sounds like a coding snack to me ;-)

jmj

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 42
  • Author of Locate32
    • View Profile
    • Locate32
    • Donate to Member
Re: Run application on low CPU level?
« Reply #2 on: August 27, 2006, 11:38 PM »
edit: I misunderstood question, sorry.

« Last Edit: August 28, 2006, 01:54 AM by jmj »

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #3 on: August 27, 2006, 11:46 PM »
How important to you is the cpu level/disk activity part of this?

I could probably code something rather quickly that you could run with command line parameters of system idle time in seconds and path to application you want to run.

It would sit in the tray and whenever the system idle time hits what you specified it will launch the application matching the path you specified.

It would only work on Windows 2k+, though...not 9x.

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #4 on: August 28, 2006, 01:50 AM »
what about mouser's ProcessTamer? instead of monitoring for CPU overload, can't a rule be specified to monitor and alert if CPU level falls below a certain limit..

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #5 on: August 28, 2006, 02:18 AM »
I actually want to run a program, not simply receive an alert.  Jeff

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #6 on: August 28, 2006, 02:44 AM »
check out this topic then.. it covers keyboard/mouse idleness but not sure of disk activity, though.

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #7 on: August 28, 2006, 04:31 AM »
Just a little something I threw together for you:

IdleStart:

Requires Windows 2000 or higher (will not run on 95/98/ME)

Run this with 2 command line parameters...

  • first is the number of seconds of system idle time you want before it opens a file
  • second is the path of the file you want it to open (don't forget to surround it with quotes if the path contains a space)

This will either run a program or open a file in its default program.

You can use this from the Windows Run dialog or use the parameters in a shortcut target.
Do NOT just click & run like a normal program or it will do absolutely nothing but sit in the system tray and look stupid.  :-[

Examples:

"C:\Program Files\IdleStart\IdleStart.exe" 30 "C:\Program Files\Winamp\winamp.exe"
(this will run Winamp after 30 seconds of system idle time)

"C:\Program Files\IdleStart\IdleStart.exe" 600 "P:\Photos\Ugly Dude.jpg"
(this will open the file in the default program for .jpg files after 10 minutes of system idle time)

If you use a shortcut to start this, make sure you put the path to the folder your file or program is located in as the 'Start in:' location. Not the path to the file, just the folder.

Example:

If you want it to start Winamp, you would put the path to the Winamp folder in the 'Start in:' box.

idlestart shortcut properties.png

Right click the tray icon for 2 menu options: Exit and Disable/Enable.

Hover over the icon to see path of file it is set to open.

I didn't add the CPU level detection to it. You didn't say if it HAD to have that and there was no quick easy way for me to do it and it actually work.

Lucky for you, I have been messing with code to detect Windows version and system idle time, very recently.  ;)

You made me break a promise of 9x compatability.  :(

But I forgive you.  :)
« Last Edit: October 16, 2006, 09:06 AM by app103 »

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #8 on: August 28, 2006, 04:50 AM »
Before I try it out, thank you for taking the time to do this for me.  And also lanux128 for your ideas.  I am exploring them now.

Jeff

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #9 on: August 28, 2006, 03:31 PM »
Idlestart works well.  Thanks.  Any chance of incorporating a CPU level trigger eg if the CPU is less than x% for y secs start an application (or start a program and when its CPU usage falls start the next one)?

I actually found something that will do this (Shutter) but it's designed for shutdown and one can only run one configuration at a time.

Jeff


app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #10 on: August 28, 2006, 06:08 PM »
I will see what I can do, but no promises and I am not sure how long it would take for me to do.

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #11 on: August 28, 2006, 06:29 PM »
No problem.  Im looking at a combination of X-ecutor and Shutter to do what I want so I may not need anything more.  I trust you got the birdseed  ;)

brett

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 125
  • Australia
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #12 on: September 02, 2006, 09:58 AM »
Hi Jeff

Here is a AHK script that should do the job, although I have not tested it much.

As always, comments, suggestions, improvements, all welcome.
Doublebogey

Screenshot - 03_09_2006 , 12_58_38 AM.png







« Last Edit: September 03, 2006, 05:50 AM by doublebogey »

brett

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 125
  • Australia
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #13 on: September 03, 2006, 07:17 AM »
Error in the first attempt, did not stay minimised.  :-[

Now starts minimised, and added 'Pause Timing'

thanks
Doublebogey


zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #14 on: September 05, 2006, 10:15 AM »
Hi Doublebogey,

Firstly thanks for taking time in writing this Utility.

I was looking for this kind of a utility for some time. Is it possible for you to add the following features.

1. Ability to keep it running always ( currently after the first detection it terminates it self)
2. Can the first condition be a OR instead of AND...currenlty i think it is low CPU and Idle time.

and finally one question...Does it kick-off the programs as soon as it detects the CPU level is low or does it start the programs after the CPU level is back to normal ?


Thanks
zeemar

brett

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 125
  • Australia
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #15 on: September 06, 2006, 09:10 AM »
Hi Zeemer

Glad you could use it.

The condition OR should be met by either increasing CPU to 99% , or, decreasing Keyboard Idle to 1 seconds.
This should have the effect of only relying on 1 condition to trip the 'file runs'

and finally one question...Does it kick-off the programs as soon as it detects the CPU level is low or does it start the programs after the CPU level is back to normal ?
I'm not sure what your after,??
If the CPU stays below the threshhold for x seconds continuously, start the run sequence, if the CPU jumps above the threshhold, restart timer.
even after the sequence has begun.
IE. in the screenshot, when Google Earth is started, my CPU jumps high for a few seconds, so 'Screenshotcaptor' is delayed at least 60 seconds.

Ver 0089
Starts with GUI again
added - Start,Reset,Stop Buttons
added - When complete   exit or stop

Screenshot
Screenshot - 06_09_2006 , 11_57_58 PM.pngIDEA: Run application on low CPU level?

Cheers
Doublebogey
dB


zeemar

  • Participant
  • Joined in 2005
  • *
  • default avatar
  • Posts: 32
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #16 on: September 06, 2006, 10:22 AM »
Hi Doublebogey


Thanks for making the changes.

I am not able to properly use it. Basically, i would like to use this program in the following scenario.

I want to run a program when the CPU load is over 75%. regardless of the keyboard/mouse idle time.

Can you please tell me what the configuration should be ? I am getting confused with the Keyboard idle time setup, that is the reason i asked for a OR condition.

currently I have the set up as

1. 75% and 3 sec (CPU)

2. 1sec (keyboard)

And this new version preferences window doesn't minimize to tray. After I click start the Timer is starting, i guess it should minimize the pref window and observe the CPU usage level.

Also I am seeing a window pop up some times which a "2"

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #17 on: September 06, 2006, 02:39 PM »
If you make the idle time 9999 then it won't interfere with the CPU setting for about 3 hours?

However to run a program when the CPU is OVER 75%, instead of <75% will require some futher functionality.

doublebogey, thanks for theis app.  I will be using it when I get time to set it up.  Some dc credits coming you way shortly.

Jeff

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #18 on: September 07, 2006, 04:09 AM »
doublebogey, I just realised one has to start the timer manually now.  Could we have it so that the timer starts when db CPUlight starts please?

Jeff
« Last Edit: September 07, 2006, 04:16 AM by JeffK »

brett

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 125
  • Australia
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #19 on: September 07, 2006, 11:23 PM »
On the road at the moment, I worked on this last night and have made a few changes.
They should include

When CPU 'greater/less' then 'And/Or' then Idle 'greater/less' start these files.

Also
- A tooltip option for when minimised showing status.
- 6 file memory
- close or stay on exit


will add option to start when launched
The 2 appearing in current is a error, just a break feedback. will remove


Should be back in less then 24hrs

c. u. then

dB

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #20 on: September 08, 2006, 03:35 AM »
Thanks for your efforts, doublebogey.  Much appreciated.

Jeff

brett

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 125
  • Australia
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #21 on: September 09, 2006, 06:41 AM »
Hi all

CPUlight v0150

Screenshot shows changes

Screenshot - 09_09_2006 , 9_12_24 PM.png

Enjoyed trying to get the 'Greater / less / and / or' to work as I had never tried this before.
Have limited testing due to the variations possible now.

Feedback, comments and suggestions all still welcome.

Thanks
dB
doublebogey
« Last Edit: September 09, 2006, 06:52 AM by doublebogey »

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #22 on: September 09, 2006, 08:17 AM »
doublebogey.  Thanks for that.  I've found that if OR is selected and autostart is selected with the keyboard idle on a very high number and the CPU settind at say less than 10% for 10secs the first program starts straight away and does not wait for the 10 secs.

Jeff

JeffK

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 363
    • View Profile
    • Donate to Member
Re: Run application on low CPU level?
« Reply #23 on: September 09, 2006, 08:41 AM »
Sorry, it's OK. I think it's because I was using a previous .ini file.

Jeff

kimmchii

  • Honorary Member
  • Joined in 2005
  • **
  • Posts: 360
    • View Profile
    • Donate to Member
Re: IDEA: Run application on low CPU level?
« Reply #24 on: September 15, 2006, 05:05 AM »
1 more alternative:

RS Somnifero

 RS Somnifero enables you to schedule a single task to take place at a specific time, every X hours/minutes or triggered by CPU activity levels. It offers a choice of system reboot and shutdown options, as well as desktop screen capture, screensaver start, message popup, execute or close a program and more.
Freeware

If you find a good solution and become attached to it, the solution may become your next problem.
~Robert Anthony