Win7 Scheduled Tasks

Page 1 of 2 12 LastLast

  1. Posts : 2
    Windows 7 Prefessional
       #1

    Win7 Scheduled Tasks


    Starting to Deploy Win7Pro and found Task Scheduler different from XP.

    We run a command that powers systems off at a specific time. The command will shut the system down when no user is logged in and gives a logged in user a pop up cancel window to abort if they're working.

    I cannot seem get Win7 task scheduler to perform that same way.
    Using account SYSTEM, it will shut the system down but not allow the interactive cancel window to pop up.
    Using account USERS, it will only start the task if a user is logged in.

    Any ideas of the right setting combination to get this to work?

    Thanks
    AlienWrangler
      My Computer


  2. Posts : 28
    Windows 7 x64
       #2

    Are you scheduling the SHUTDOWN command?

    Do a SHUTDOWN -? at a CMD prompt to see the options.

    The COMPUTERNAME environment variable carries the name of the current machine.

    -Noel
      My Computer


  3. Posts : 1,426
    7 Pro
       #3

    are you using the "AT" command in your script to deploy the "shutdown" command?
      My Computer


  4. Posts : 2
    Windows 7 Prefessional
    Thread Starter
       #4

    I was using BeyondLogincs Beyond Logic Shutdown for NT/2000/XP Shutdown command because it give the user a clear interface to cancel and the timeout is adjustable.

    I was using the AT command but the problem still occurs when I manually create the job from scratch.

    Thanks
    AlienWrangler
      My Computer


  5. Posts : 1,426
    7 Pro
       #5

    would you mind copying your script into a [.code][./code] window without the "."'s?
      My Computer


  6. Posts : 28
    Windows 7 x64
       #6

    According to the documentation, a command with a user interface cannot be run using the "[ ] Run whether the user is logged in or not" option.

    There is some pertinent info for your issue in the Task Security Context topic in the Scheduler help file... Specifically, it says, "...select the radio button labeled Run whether user is logged on or not. If this radio button is selected, tasks will not run interactively. To make a task run interactively, select the Run only when user is logged on radio button."

    The intent here is apparently to never be able to put up the user interface from a program being run by one user on a session by another user.

    I think you may be out of luck with that Beyond Logic software. The system SHUTDOWN command does put up warning prompts, but the user doesn't have the option of saying, "I'm here, don't shut down".

    And you can set the Task Scheduler to only run the program if the computer has been idle.

    Why are you shutting the computers down anyway? Some people like to run things overnight. I know I'd be miffed if I had set something up to finish and found my system had been forcibly shut down by IT. Also, the hardware will generally last longer if you leave it on and it stays hot (i.e., less temperature fluctuation, less chance for moisture accumulation).

    -Noel
      My Computer


  7. Posts : 3
    Windows 7 Enterprise x64
       #7

    Hi Wrangler, I've struggled with the same issue. What I came up with is two different VB scripts each scheduled with seperate tasks, but run at the same time.
    The User version pops a window up asking to click ok to abort. If no one clicks after 5 minutes, the script runs shutdown.exe.
    The non-user version checks to see if the explorer process is running. If so, then someone is logged in and the user script will kick in and the non-user script does nothing. If not, then no one is logged in and the user script won't run, so it shuts down the computer.

    If you're interested, I can give more details.

    Ethan
      My Computer


  8. Posts : 56
    Windows 7 Home Premium 64-bit
       #8

    I just changed my home server from WHS to W7 and it works just fine for my neeeds. Now, I'm getting "Green" and would like to have the W7 "Server" go to sleep at a specific time and wake up at a specific time. I do not have the problem of a a user getting shutout since it is only my wife and I using the home network. If someone could give me the "stuff" I have to tell W7 Scheduler to accomplish this relatively straight forward feat I would appreciate it Thanks in advance.
      My Computer


  9. Posts : 3
    Windows 7 Enterprise x64
       #9

    Hi Ken429,
    What you could do is create a batch file, maybe call it sleep.bat with this command in it:
    rundll32 powrprof.dll,SetSuspendState
    Then create a sheduled task to run this when you want the computer to go to sleep. This will put your computer to sleep only if hibernate is not enabled, so you may need to modify your power settings to disable hibernation.

    To wake up again, create another batch file, maybe call it wake.bat. It doesn't matter the command you do, maybe just put "exit" as the only command, but when you create the scheduled task for it, make sure you check the box that says: "Wake the computer to run this task"

    I hope that works for you!
    Ethan
      My Computer


  10. Posts : 56
    Windows 7 Home Premium 64-bit
       #10

    Nahte,
    Thank you for the information. Looks simple and straight forward. I will give it a try. I also stumbled across a free utility called "WakeupOnStandby" which looks like it would do the job with a whole bunch of options that I don't think I want/need at this time.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 07:48.
Find Us