schedule reboot

P

Pegasus \(MVP\)

John said:
Does anyone know the steps to schedule an automatic
reboot of XP?
Thanks,
John

Use the Task Scheduler to schedule shutdown.exe at the
required time.
 
J

John

Thanks...I downloaded shutdown.exe and it works great
from cmd. How do I schedule a dos command from scheduler?

Thanks,
John
 
P

Pegasus \(MVP\)

There is no "DOS" under WinXP - DOS is an operating
system! Perhaps you meant to write "how to I schedule
an executable from the scheduler". The answer is: just
click what you want when you get the file selection
panel while creating a new task. It all included in this
nice and easy GUI!
 
J

John

You are right. I tested the command using run and it
works fine. I have scheduled the task to run; used the
advance function to add a password to the user. Also
added the parameter "-r". However, every time I schedule
the job to run 2 minutes after configuring; nothing
happens. Any ideas?
Thanks,
John
 
P

Pegasus \(MVP\)

Put the shutdown command inside a batch file like so:

c:\windows\system32\shutdown.exe -r 1>c:\test.log 2>c:\test.err
(this is all one single line!)

Now do this:
1. Run the batch file from a Command Prompt to make sure that it works.
2. Use the Task Scheduler to run ***this*** batch file, not shutdown.exe.
3. Wait until the job has run.
4. Examine the two log files that it created.
 
J

John

I tried the below suggestion. Ran fine from command
prompt. Did not run from scheduler. test log was empty.
I checked event viewer and found the following2 messages:

Logon attempt by: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0
Logon account: Owner
Source Workstation: S0029209527
Error Code: 0xC000006A


For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Logon Failure:
Reason: Unknown user name or bad password
User Name: Owner
Domain: S0029209527
Logon Type: 4
Logon Process: Advapi
Authentication Package: Negotiate
Workstation Name: S0029209527

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

Thanks,
John


it did not run. I checked
 
P

Pegasus \(MVP\)

- What about the contents of c:\test.err?
- Did you run the job under an existing account?
- Are you sure that you entered the correct password?
- Does this account have administrative privileges?
- Did you examine the Task Scheduler report?
(It's under the Advanced pull-down menu)
 
J

John

Test.err - empty

yes, the AT service account. Note: The XP user account
does NOT have a password. I did not create a XP user
password as then system would reboot system wpuld stop at
log on screen.

Yes, I am using the correct AT password or the system
would not save my changes. Note: There is NO password for
the users log on screen. If I had a user log on password
it reboot would stop at log on screen

Yes account has administration rights.

Scheduler log when using AT service account password:
"Task Scheduler Service"
Started at 6/1/2004 6:26:01 AM
"testshutdown.job" (testshutdown.bat) 6/1/2004 6:30:00 AM
** ERROR **
The attempt to log on to the account associated
with the task failed, therefore, the task did not run.
The specific error is:
0x8007052e: Logon failure: unknown user name or
bad password.
Verify that the task's Run-as name and password
are valid and try again.


Leaving password as blank:
"shutdown.job" (shutdown.exe) 6/1/2004 10:26:00 PM **
ERROR **
The attempt to log on to the account associated
with the task failed, therefore, the task did not run.
The specific error is:
0x8007052f: Logon failure: user account
restriction. Possible reasons are blank passwords not
allowed, logon hour restrictions, or a policy restriction
has been enforced.
Verify that the task's Run-as name and password
are valid and try again.


Thanks,
John
 
P

Pegasus \(MVP\)

Run gpedit.msc, then navigate to "User rights assignment" and
make sure that the chosen account can "Log on as a batch job".
 
J

John

I could not run gprdit.msc. File was not found. Tried
searching the system for gpedit.*. System did not find a
file.

thanks,
John
 
P

Pegasus \(MVP\)

Be careful with your spelling. It's "gpedit.msc", not "gprdit.msc".
If still unsuccessful, use Explorer to check all files that end on
"msc" in this folder: "c:\windows\system32". And if you prefer
a graphical path: Control Panel / Administrative Tools /
Group Policy.
 
J

John

Sorry about the type O. Under Admin Tools I have

Component Services Shortcut
Computer Management
Data source (ODBC)
Event Viewer
Microsoft .NET Framework Configuration
Microsoft .NET Framework Wizards
Performance
Services

NO Group Policy

I am run XP Home at the house. At my brother-in-law's
office I have XP Pro. Tonight I will try this at his
office. Search for *.msc did not find the gpedit.msc file.

Thanks,
John
 
P

Pegasus \(MVP\)

Sorry, my experience is limited to Win2000 & WinXP Professional.
Different rules might apply under WinXP Home, both for scheduling
a batch file and for rebooting a machine.
 
J

John

I am at the office (XP pro). I can reboot using the batch
file if I set up a password for the XP user account.
However, this is an issue as the reboot stops at the log
on screen.

If I do not use a password for the XP user account, I get
a password error. The test.err and test.log are empty. I
did check gpedit and this user has the rights to run a
batch file. Is there a way to automatically log the user
on from the shutdown batch file?

Thanks,
John
 
P

Pegasus \(MVP\)

Your post does not make it clear if the batch file
fails when you run it in the foreground or when you
run it in the background. If it runs OK in the foreground,
what's the contents of the two log files?

About "automatically logging on": This is exactly
what the account/password screen is meant for
when you schedule a job in the Task Scheduler's
graphical user interface!
 
J

John

When I schedule the batch job (background) and have a XP
user account the job runs fine. Both log files are empty.
However, the reboot stops at the log on screen. Reboot
waiting for a password. Is there a away to pass the
password as a parameter?

If I set up the XP account with sys admin rights but no
password, the scheduled batch job (background process)
does not run. I have set up an AT service password.
However, I get a status message that the job does not run
because of a password issue. The batch log files are
empty.

If I set the AT service password to blanks(delete old
password), the scheduled batch job does not work and the
status message is because the password is blank. The log
files are empty.

Thanks,
John
 
P

Pegasus \(MVP\)

I have some strong reservations about this thread: It
deals with an utterly trivial issue but it has been going
round in circles for reasons that I will not put into
writing. If you are seriously interested in resolving the
issue then send your email address to
(e-mail address removed). I will then reply to
you directly. You need to drop all "z"s from the above
address.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

XP scheduled reboot 4
Rebooting Windows XP Professional 1
Access Dcount (multiple criteria) 3
Reboot 1
Working around Task Scheduler / Sysprep bug? 0
Windows XP SP 3.0 setup error 4
Schedule a reboot? 2
Way to schedule restarts? 3

Top