General discussion

Locked

Can Task Scheduler force a re-boot?

By MarkSpencer ·
Is there anyway to set up task scheduler to re-boot the system at a specific time? We have a system that stays up 24-7 (part of time clock system). But resources run low and they don't reboot as often as they should. Any other possible way to do this?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Can Task Scheduler force a re-boot?

by mmccaskill69 In reply to Can Task Scheduler force ...

Yes, it can be done.
You would need to create a batch file.
I created a batch file called restart.bat in ms-dos prompt.
At ms-dos prompt I typed edit restart.bat and entered.
I added this line,"rundll32.exe shell32.dll,SHExitWindowsEx (x)"
In the place of (x) you would put one of the following numbers: 2 = reboot
4 = Forced reboot (this is used in case there are certain programs that have to be closed before a restart).
Hold down ALT and press F, then press X.
Hit enter to save the changes.
This batch file works for me using Task Scheduler on a 98' system.
You will need to add, to the batch file, lines if you have a logon window that comes up after a restart so it will autologon, unless you use tweakui (if the system is 95' or 98').
The article, which you can find at www.microsoft.com/technet, is Q234216.
Good Luck!

Collapse -

Can Task Scheduler force a re-boot?

by MarkSpencer In reply to Can Task Scheduler force ...

Had to go to Microsoft to see formatting.
I was trying to put the number is ().
Got it to work - thanks!

Collapse -

Can Task Scheduler force a re-boot?

by tudore In reply to Can Task Scheduler force ...

I'm using NT right now, so I can't test this out, but I'll try to check it tonight.

Make a shortcut wherever you please on your computer(maybe your desktop?). put this in as the shortcut's target:

C:\WINDOWS\RUNDLL.EXE user.exe,exitwindowsexec

All on one line.

then have task scheduler run the shortcut at a specific time. I haven't checked this, so there may be a problem with having to hit okay to shutdown. If that is the case, the above answer would be better.

Collapse -

Can Task Scheduler force a re-boot?

by MarkSpencer In reply to Can Task Scheduler force ...
Back to Windows Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums