Re: How do I run a batch file when a server reboots?
- From: "Pegasus \(MVP\)" <I.can@xxxxxxxxxx>
- Date: Wed, 6 Aug 2008 23:25:44 +0200
"Marten" <absolute88@xxxxxxxxxxx> wrote in message
news:qi3k94ls4v0186mknv40vbmbhbm72e5sj4@xxxxxxxxxx
On Wed, 6 Aug 2008 21:46:06 +0200, "Pegasus \(MVP\)"
<I.can@xxxxxxxxxx> wrote:
for the record, the Shutdown command used is:
C:\WINDOWS\system32\shutdown.exe /r /d p:4:1
Marten
I'm quite aware of the syntax for the shutdown command . . .
Running a command at boot time (the equivalent of Autoexec.bat)
is dead easy: Use the Task Scheduler to run it at boot time.
However - how will you distinguish between a boot after a
scheduled shutdown and a boot caused by a crash?
About trimming the log file: If you schedule a reboot once every
week then you accumulate some 2 kBytes per annum. I would
not call this a huge amount of disk space - it's puny, so why worry?
My apologies for a grammatical error. I should have written "the
Shutdown command as I am using it is:" I added it in case you saw
something that was incorrect or if someone else reading this thread
wanted to know what I had done.
I haven't worked much with the scheduler. I wasn't aware there was an
at boot option. Thank you for pointing it out to me. As for
distinguishing, since I know the time of the scheduled reboot, I'd
expect anything outside that time frame would be questionable.
The >> redirect is a consideration. I was originally only concerned
with the last reboot.
Thank you for the information. It helps me out.
Marten
Thanks for the feedack.
.
- References:
- How do I run a batch file when a server reboots?
- From: Marten
- Re: How do I run a batch file when a server reboots?
- From: Pegasus \(MVP\)
- Re: How do I run a batch file when a server reboots?
- From: Marten
- Re: How do I run a batch file when a server reboots?
- From: Pegasus \(MVP\)
- Re: How do I run a batch file when a server reboots?
- From: Marten
- How do I run a batch file when a server reboots?
- Prev by Date: Re: How do I run a batch file when a server reboots?
- Next by Date: Compress files and verify
- Previous by thread: Re: How do I run a batch file when a server reboots?
- Next by thread: Re: How do I run a batch file when a server reboots?
- Index(es):
Relevant Pages
|