Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Win7 Scheduled Tasks

05 Feb 2010   #1

Windows 7 Prefessional
 
 
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 Windows 7 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 System SpecsSystem Spec
.

05 Feb 2010   #2

Windows 7 x64
 
 

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 System SpecsSystem Spec
05 Feb 2010   #3

 

are you using the "AT" command in your script to deploy the "shutdown" command?
My System SpecsSystem Spec
.


05 Feb 2010   #4

Windows 7 Prefessional
 
 

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 System SpecsSystem Spec
05 Feb 2010   #5

 

would you mind copying your script into a [.code][./code] window without the "."'s?
My System SpecsSystem Spec
06 Feb 2010   #6

Windows 7 x64
 
 

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 System SpecsSystem Spec
05 Jan 2011   #7

Windows 7 Enterprise x64
 
 

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 System SpecsSystem Spec
09 Jan 2011   #8

Windows 7 Home Premium 64-bit
 
 

I just changed my home server from WHS to Windows 7 and it works just fine for my neeeds. Now, I'm getting "Green" and would like to have the Windows 7 "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 Windows 7 Scheduler to accomplish this relatively straight forward feat I would appreciate it Thanks in advance.
My System SpecsSystem Spec
09 Jan 2011   #9

Windows 7 Enterprise x64
 
 

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 System SpecsSystem Spec
10 Jan 2011   #10

Windows 7 Home Premium 64-bit
 
 

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 System SpecsSystem Spec
Reply

 Win7 Scheduled Tasks




Thread Tools



Similar help and support threads for2: Win7 Scheduled Tasks
Thread Forum
Services vs Scheduled Tasks General Discussion
Report of scheduled tasks? General Discussion
Scheduled Tasks General Discussion
Scheduled Tasks in Win7 Performance & Maintenance
Changing scheduled tasks Performance & Maintenance
Run scheduled tasks in background Performance & Maintenance
Scheduled Tasks (what to remove) General Discussion

Our Sites

Site Links

About Us

Find 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 11:33 AM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33