Scheduled Task WIndows 7 x64

I have a scheduled task set in Windows 7 to run shutdown.exe -s at the end of our work day to shutdown a set of 35 computers. (I had to enter in each task manually on 30+ computers). It was recently discovered that when DST changed, so did the task execution time. At present it is listed to run the task at 330, but now runs at 230. I have tried to edit the task manually, but the only way to truly fix it has been to manually delete the task, and recreate it with the time set at 330. I do not want to do this because when the next time change occurs, the same issue will re-occur, and I will lose all my hair after I have pulled it all out. There has got to be a better way? Any suggestions? Note: I do not have access to GPOs, but can make "suggestions" to implement a GPO that could potentially automate this task.

A bit cryptic, isn’t it? The preceding script schedules a hypothetical program named Cleanup.exe to run at 12:30 PM every Monday, Wednesday, and Friday. For more information about the different parameters used in this script, you might want to check out this section of the Microsoft Windows 2000 Scripting Guide.

They also note that there are incompatibilities between WMI created scheduled task, and Task Manager created tasks, so it's a bit of a schmozzle.

Scripting Guys wrote:

The problem we have here is that Windows actually has two different – and, sadly, not fully-compatible – APIs (Application Programming Interfaces) used to manage scheduled tasks. For one, there are the Task Scheduler APIs used by both the Task Scheduler and by Schtasks.exe, a command-line task management tool that ships with Windows XP and Windows Server 2003. For another, there are the so-called At APIs used by At.exe and by WMI’s Win32_ScheduledJob class.

I'm almost positive you can deploy tasks via Group Policy for Windows 7.

Even if you can't convince the idiot in charge to do this, you can at least set up the task on one machine, then export the task and import it to the other machines. This at least makes you do a few clicks 30 times as opposed to setting up the task 30 times.

Also, this problem may come from not checking the "synchronize across time zones" option when setting the time on the trigger.

@entegy - I think you may be on to something regarding the unchecked box. I will check tomorrow to see if I can just edit the preexisting tasks to check the box. Regarding the exporting of the task, I originally tried that and I can not recall if I was successful in doing so. Will have to give it another shot. On a side note, I'd love to be in a different position where I can leverage GPOs instead of manually work arounds, but what can you do...

Sounds like you're happy with scheduled tasks, but if you have the rights, and the machines aren't locked down too hard, running a command from one computer against multiple computers can feel empowering.

Hi waiter006 - That powershell script looks really cool. I am using scheduled tasks, because it was better than what we have had in the past (nothing) to shut the computers down. Can the powershell script be leveraged someway via GPO for example to shutdown the computers in an OU at a particular time (then I can just delete the locally created scheduled task)? Ideally said script would allow the shutdown to occur if the worsktations were locked, or would issue a wake up request to wake them up from a standby state. The scheduled task accomplished all of this for me.

I would suggest it's far better to set an idle power management policy and have it sleep the computer after x hours of inactivity than it is to do a hard power off at a certain hour. You're much less likely to lose a users data or cause them inconvenience if they happen to be working late and will therefore have fewer users at your doorstep with pitchforks.

We already use a product that puts them to sleep after 120 minutes of inactivity however to reduce power use even further the powers that be request a complete shutdown at the end of the day.

Honestly, put a killawatt meter on one of your PC's, I bet there's little to no difference between sleep and "off", if there is any substantial difference try hibernate which is essentially save state and power "off". I use the quotes because ATX systems are never really off unless they have a hard switch on the PSU or you pull the plug.

I know that is what I have read as well regarding power consumption however the powers that control corporate policy still require a shutdown.

Ok, so do hibernate which is just as off as anything else. Also my response would be to do a TCO study, show what the difference is between sleep and off multiply that times power cost and the number of PC's and compare that to one document which took 2 hours of manpower to create which got lost due to overbearing policy, my guess is the single document wins. I'm pretty much as green as they come without being a hippy and I still have a hard time thinking that a forced shutdown event is ever a good idea.

Do a hibernate instead of a shutdown. Even power loss would not matter in that case, as there no volatile state left. For a modern system hibernate is as off as shut down from a power consumption point of view.*

Also, you might want to look into Powershell remoting.

And to cheer you up:the branch office of the company I worked at and quit for good reasons is now also on a power saving trip. They installed timers on the thin clients, as they must guzzle juice as crazy with that amber LED lighting constantly. During a firmware update, power got cut off. I guess the downtime for personnel and the thin clients easily are worth the IT power bill for a decade.There's a line between being economic and being greedy

* I saw some exceptions. But it was not noteworthy (>2W) and my money would be on a bug more than a feature.

Hi waiter006 - That powershell script looks really cool. I am using scheduled tasks, because it was better than what we have had in the past (nothing) to shut the computers down. Can the powershell script be leveraged someway via GPO for example to shutdown the computers in an OU at a particular time (then I can just delete the locally created scheduled task)? Ideally said script would allow the shutdown to occur if the worsktations were locked, or would issue a wake up request to wake them up from a standby state. The scheduled task accomplished all of this for me.

That was more "for funsies" suggestion.

Powershell isn't the best fit for triggering via GPO -- you'd have to sign the script, or loosen your code execution policy.

Since you want to wake machines on a schedule, your scheduled tasks are probably the most practical solution (waking a machine remotely usually won't work--maybe if Wake on LAN is enabled in BIOS, but I haven't played with that). As Dac suggested earlier, you'll probably want to script the creation of your tasks if you have to touch all 30ish machines again in the future. Depending on your scripting language preferences, powershell might be more legible than vbscript.http://blogs.technet.com/b/heyscripting ... d-job.aspx