DonationCoder.com Forum
DonationCoder.com Software => Coding Snacks => Post New Requests Here => Topic started by: JeffK 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
-
sounds like a coding snack to me ;-)
-
edit: I misunderstood question, sorry.
-
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.
-
what about mouser's ProcessTamer (https://www.donationcoder.com/Software/Mouser/proctamer/index.html)? instead of monitoring for CPU overload, can't a rule be specified to monitor and alert if CPU level falls below a certain limit..
-
I actually want to run a program, not simply receive an alert. Jeff
-
check out this (https://www.donationcoder.com/forum/index.php?topic=3149.0) topic then.. it covers keyboard/mouse idleness but not sure of disk activity, though.
-
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.
[ You are not allowed to view attachments ]
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. :)
-
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
-
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
-
I will see what I can do, but no promises and I am not sure how long it would take for me to do.
-
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 ;)
-
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
[ You are not allowed to view attachments ]
-
Error in the first attempt, did not stay minimised. :-[
Now starts minimised, and added 'Pause Timing'
thanks
Doublebogey
-
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
-
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
[ You are not allowed to view attachments ]
Cheers
Doublebogey
dB
-
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"
-
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
-
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
-
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
-
Thanks for your efforts, doublebogey. Much appreciated.
Jeff
-
Hi all
CPUlight v0150
Screenshot shows changes
[ You are not allowed to view attachments ]
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
-
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
-
Sorry, it's OK. I think it's because I was using a previous .ini file.
Jeff
-
1 more alternative:
RS Somnifero (http://www.snapfiles.com/reviews/RS_Somnifero/somnifero.html)
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
(http://8.10.179.164/screenfiles/somnifero.gif)