It is currently November 26th, 2022, 8:16 pm

Simple Idle Task launcher

Skins that control functions in Windows or Rainmeter
Chozo4
Posts: 4
Joined: September 27th, 2011, 11:16 am

Simple Idle Task launcher

Post by Chozo4 »

Figured others might find it useful if they themselves are either folders (Folding@Home) or other contributors to the 'collective teams' out there and need one premade. If you've ever had the need to launch tasks or applications while idle, the task scheduler will leave you.. disappointed as it considers no user activity, no disk i/o AND no cpu activity as the 'idle' state to launch them which won't happen while contributing CPU power.

This is a simple 'service' type skin that simply handles the task based only on user idle and also will run something after the user returns. This is already preconfigured in my use to load a batch file after 1 hour and re-run it again after return such as make f@h backups and flush disk cache. It can be easily edited to ones needs otherwise.

Code: Select all

[RainMeter]
  AlwaysOnTop=-2
  Update=1000
  BackgroundMode=1
[DummyMeter] ;required to load
  Meter=String
  Hidden=1
[MOSIdle]
  Measure=Plugin
  Plugin=SysInfo
  SysInfoType=IDLE_TIME
[RUN_IdleTasks]
  Measure=Calc
  Formula=MOSIdle
  ifEqualValue=3600
  ifEqualAction=!Execute ["hidec" postrun.bat /Idle][!EnableMeasure "RUN_WasIdleTasks"]
[RUN_WasIdleTasks]
  Measure=Calc
  Formula=MOSIdle
  ifEqualValue=0
  ifEqualAction=!Execute ["hidec" postrun.bat /Idle][!DisableMeasure "RUN_WasIdleTasks"]
  Disabled=1
Simply add tasks as you need them to be run. If you need a task to run every X-Interval instead of 'only after X-time' while idle simply change it to the following:

Code: Select all

[RUN_IdleTasksInterval]
  Measure=Calc
  Formula=(MOSIdle+1)%3600
  ifEqualValue=0
  ifEqualAction=!Execute ["hidec" postrun.bat /Idle][!EnableMeasure "RUN_WasIdleTasks"]
Thanks to the rainmeter team for adding the IDLE_TIME query a while back. It helped knock off yet another clunky application from my list to suit my needs.