Announcement

Collapse
No announcement yet.

auto shut down on idle

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • auto shut down on idle

    hello everyone i am new to this forum , and I dont know if I am posting my question in the right place ...but anyway here goes ...
    I know I can schedule an auto shut down in the task scheduler on system idle time .
    but I need to doit in a command so I can deploy it to sevral comuters ,
    does anyone knows how to write this in a command ?
    basiclly I need a task that runs daily at a certain time , and if at that time the system is idle more than 30 minutes it shuts down , if not the task keeps running and checking system idle time untill the mashine is idle to shut it down , and the task stops running after few hours.
    I am trying to do this with the schtasks command but I cant find the right syntax that willallow me DAILY+ONIDLE
    help will be very much apriciated
    tnx
    Last edited by alya; 9th June 2009, 09:12.

  • #2
    Re: auto shut down on idle

    Code:
    schtasks create onidle
    
    Syntax
    schtasks /create /tn TaskName /tr TaskRun /sc onidle /iIdleTime [/sd StartDate] [/s computer [/u [domain\]user /p password]] [/ru {[Domain\]User | "System"} [/rp Password]]
    Ref: http://www.microsoft.com/resources/d....mspx?mfr=true

    You don't need to schedule it daily as well as when ONIDLE, If you schedule the command this way it will be scheduled to run the next time the system is Idle for the specified amount of time.
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

    Comment


    • #3
      Re: auto shut down on idle

      tnx for the quick reply

      I know the syntax for the command ,and what you gave me creates a task that shuts down the computer during the day is it is idle more than XX min ..
      that is not exactly what i ment ...
      my goal is to create a task that starts to run every day at 19:00 for example ...
      and than it checks to see if the system was idle more than 30 min ,if it is the computer shuts down , if not the task will keep running and checking for idle time until the next morning ...
      I know it probably can be done with scripting and vb , but i was wondering if there is a simple task scheduler command to preform this , if you create a task in the task scheduler manualy it can be done , but I cant find a command in schtask to do the same ...
      tnx again

      Comment

      Working...
      X