RE: Scheduled Reboot

From: Mike Journey (imrj@airborne.com)
Date: 01/20/03


From: "Mike Journey" <imrj@airborne.com>
Date: Mon, 20 Jan 2003 09:54:01 -0800


Thanks Jack.

The workaround is this:

I downloaded a third party Shutdown.exe.

I created a batch file with an AT job to run shutdown -
r. I then use Task Scheduler to schedule the batch job
to run at the appropriate time. (An AT job by itself
isn't the best option because as soon as you open Task
Scheduler, any AT jobs get converted to scheduled tasks
and the problem comes back...)

There is a permissions(?) issue with Task Scheduler
running Shutdown.exe. I've tried many different RunAs
users (administrator, system, etc...) and shutdown.exe
will not run, with no user logged on, via Scheduled
Tasks. The AT command doesn't have this problem and runs
the third party shutdown.exe correctly with no one logged
on.

In all cases, the standard WinXP Pro shutdown.exe will
not execute when no one is logged on.

Mike J.

>-----Original Message-----
>Hi Mike,
>
>I am currently trying to reproduce the issue now. Also,
I suggest you just schedule the
>C:\Windows\System32\shutdown -r command and check if it
works.
>
>Have a nice day!
>
>Sincerely,
>Jack Wang
>Microsoft Online Support Professional
>
>Get Secure! - www.microsoft.com/security
>
>=====================================================
>When responding to posts, please "Reply to Group" via
>your newsreader so that others may learn and benefit
>from your issue.
>=====================================================
>
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>--------------------
>| Content-Class: urn:content-classes:message
>| From: "Mike Journey" <imrj@airborne.com>
>| Sender: "Mike Journey" <imrj@airborne.com>
>| References: <1b2801c2b778$d888d5c0
$d5f82ecf@TK2MSFTNGXA12>
><AERtKk8tCHA.896@cpmsftngxa09>
>| Subject: RE: Scheduled Reboot
>| Date: Thu, 9 Jan 2003 10:13:09 -0800
>| Lines: 124
>| Message-ID: <2e6801c2b80a$c4028b40
$cef82ecf@TK2MSFTNGXA08>
>| MIME-Version: 1.0
>| Content-Type: text/plain;
>| charset="iso-8859-1"
>| Content-Transfer-Encoding: 7bit
>| X-Newsreader: Microsoft CDO for Windows 2000
>| X-MimeOLE: Produced By Microsoft MimeOLE
V5.50.4910.0300
>| Thread-Index: AcK4CsQCegkSENnxSr+tYj8XfY9kUw==
>| Newsgroups: microsoft.public.windowsxp.security_admin
>| Path: cpmsftngxa09
>| Xref: cpmsftngxa09
microsoft.public.windowsxp.security_admin:40445
>| NNTP-Posting-Host: TK2MSFTNGXA08 10.40.1.160
>| X-Tomcat-NG: microsoft.public.windowsxp.security_admin
>|
>| Jack,
>|
>| Thanks for the reply. Yes, it works fine when a user
is
>| logged on. The concern is when the user ISN'T logged
on.
>|
>| You can easily reproduce this by putting "shutdown -r -
t
>| 00" in a .CMD file and set task scheduler to run
the .CMD
>| file while you are logged off. We're running the task
as
>| the local administrator. The task will fail when no
one
>| is logged on, but work correctly when someone is
logged
>| on. If you pipe the output of the shutdown command to
a
>| file, the error result is "The device is not ready".
>|
>| There are no entries in any event log (app, sys, or
>| security) that correspond to the problem.
>|
>| Mike J.
>|
>| >-----Original Message-----
>| >Hi Mike,
>| >
>| >Does it work when the user logs on to the Windows XP
>| computer? You may check if it
>| >works in Safe Mode.
>| >
>| >315222 A Description of the Safe Mode Boot Options in
>| Windows XP
>| >http://support.microsoft.com/?id=315222
>| >
>| >Also, Please attach the event log to me.
>| >
>| >Step 1: Click Start, click Run, and then
type "eventvwr"
>| (without the quotation marks),
>| >click OK.
>| >
>| >Step 2: Right-click Application and select Save Log
File
>| As.
>| >
>| >Step 3: Save it Application.evt.
>| >
>| >Step 4: Repeat step 1 to 3 to save the Security and
>| System event to Security.evt and
>| >System.evt.
>| >
>| >Step 5: Delete all the Application, Security and
System
>| log in the Event Viewer.
>| >
>| >Step 6: Restart the computer. When the issue occurs,
>| save the new Application,
>| >Security and System log to three new files and send
them
>| to me.
>| >
>| >Have a nice day!
>| >
>| >Sincerely,
>| >Jack Wang
>| >Microsoft Online Support Professional
>| >
>| >Get Secure! - www.microsoft.com/security
>| >
>| >=====================================================
>| >When responding to posts, please "Reply to Group" via
>| >your newsreader so that others may learn and benefit
>| >from your issue.
>| >=====================================================
>| >
>| >This posting is provided "AS IS" with no warranties,
and
>| confers no rights.
>| >--------------------
>| >| Content-Class: urn:content-classes:message
>| >| From: "mike J" <imrj@airborne.com>
>| >| Sender: "mike J" <imrj@airborne.com>
>| >| Subject: Scheduled Reboot
>| >| Date: Wed, 8 Jan 2003 16:48:37 -0800
>| >| Lines: 23
>| >| Message-ID: <1b2801c2b778$d888d5c0
>| $d5f82ecf@TK2MSFTNGXA12>
>| >| MIME-Version: 1.0
>| >| Content-Type: text/plain;
>| >| charset="iso-8859-1"
>| >| Content-Transfer-Encoding: 7bit
>| >| X-Newsreader: Microsoft CDO for Windows 2000
>| >| X-MimeOLE: Produced By Microsoft MimeOLE
>| V5.50.4910.0300
>| >| Thread-Index: AcK3eNiIvuBYaIWzSVOKRVPUZ5xIkA==
>| >| Newsgroups:
microsoft.public.windowsxp.security_admin
>| >| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
>| >| Path: cpmsftngxa09!cpmsftngxa10!cpmsftngxa06
>| >| Xref: cpmsftngxa09
>| microsoft.public.windowsxp.security_admin:40331
>| >| X-Tomcat-NG:
microsoft.public.windowsxp.security_admin
>| >|
>| >| On Win2K it's possible to set up a scheduled
nightly
>| >| reboot using task scheduler and the SHUTDOWN
command
>| in
>| >| a .CMD file. The reboot occurs on time regardless
if
>| a
>| >| user is logged on at the time.
>| >|
>| >| However, on XP, the SHUTDOWN command fails with
a "The
>| >| device is not ready" error message IF a user is not
>| >| logged on. (i.e. The computer is at the Ctrl-Alt-
Del
>| to
>| >| log on window).
>| >|
>| >| I need to find a way around this. I have several
>| hundred
>| >| remote computers that I would like to have reboot
>| >| nightly. Sometimes there isn't a user logged on and
>| >| the "shutdown -r" command fails.
>| >|
>| >| Any ideas?
>| >|
>| >| Thanks,
>| >|
>| >| Mike Journey
>| >| Systems Admin
>| >| Airborne Express
>| >|
>| >|
>| >
>| >
>| >.
>| >
>|
>
>
>.
>



Relevant Pages

  • Re: How do I run a batch file when a server reboots?
    ... Scheduler to invoke a batch file with two commands inside: ... what ever reason the Shutdown fails and the server doesn't reboot. ... I'm quite aware of the syntax for the shutdown command. ...
    (microsoft.public.windows.server.scripting)
  • Re: Shutdown schedule and MS04-011
    ... >>Subject: Re: Shutdown schedule and MS04-011 ... >>scheduler start the job then the server isn't lock it work too. ... >>message in the event viewer and for the task scheduler everything is OK ... >>> Hello Jean-Jacques, ...
    (microsoft.public.windows.server.setup)
  • Re: Use Windows Scheduler to switch off PC
    ... > How can I use the windows scheduler, or by other means, to switch off my ... There is a command line utility called shutdown. ... To shut windows down at midnight using the task scheduler, ...
    (microsoft.public.windowsxp.general)
  • RE: Updates
    ... If you run the shutdown command ... terminaled in by executing the command "locally" as well. ... You will need to run this command from each server you want to auto restart ... Then you can simply schedule the script to run in Task Scheduler. ...
    (microsoft.public.windows.server.general)
  • Re: Rats, 884573 n/a to WINXP Home! "Access dened"
    ... I made a checkpoint and followed your directions. ... The original scheduler problem was unresolved. ... >user account, adding a password will prevent this from ... >Reboot to see if you get the desired results. ...
    (microsoft.public.windowsxp.newusers)