suing at or schtasks to run remote shutdown

  • Thread starter Thread starter totoro
  • Start date Start date
T

totoro

Guest
I am trying to set up our XP SP2 clients to shut down at a set hour Monday
through Friday for the typical reasons.
I am trying use a the AT and /or the SCHTASKS command to run the
shutdown.exe command, but it never works.
THe sceduled task always appears on the client, after I run the AT or
SCTASKS from a 2003 domain controller, and I have tried running the shutdown
diretly and through a local batch file (which I have test directly and that
works).

Is there a documented issue with shutdown and these remote schedulers? '

Thanks in advance!!

P.S. I already have an alternative method: I create a batch file on the DC
that shutdown the XP PCs and I schedule that, that works, but I want to try
this alternative and compare results. I must be missing something.
 
Re: suing MS for damages because of at or schtasks to run remote shutdown

Re: suing MS for damages because of at or schtasks to run remote shutdown


"totoro" <totoro@discussions.microsoft.com> wrote in message
news:B48F451C-4285-45C1-B1CC-D5B778B61562@microsoft.com...
>I am trying to set up our XP SP2 clients to shut down at a set hour Monday
> through Friday for the typical reasons.
> I am trying use a the AT and /or the SCHTASKS command to run the
> shutdown.exe command, but it never works.
> THe sceduled task always appears on the client, after I run the AT or
> SCTASKS from a 2003 domain controller, and I have tried running the
> shutdown
> diretly and through a local batch file (which I have test directly and
> that
> works).
>
> Is there a documented issue with shutdown and these remote schedulers? '
>
> Thanks in advance!!
>
> P.S. I already have an alternative method: I create a batch file on the DC
> that shutdown the XP PCs and I schedule that, that works, but I want to
> try
> this alternative and compare results. I must be missing something.


No, there is no issue with shutdown.exe, documented or otherwise.
The problem lies with your command. Let's have a look at it!
 
Re: suing MS for damages because of at or schtasks to run remote s

Re: suing MS for damages because of at or schtasks to run remote s



"Pegasus (MVP)" wrote:

> No, there is no issue with shutdown.exe, documented or otherwise.
> The problem lies with your command. Let's have a look at it!
>


I think my issue is understanding where the " should be in the statement:

schtasks.exe /create /SC DAILY /TN shutoff /TR
"\"C:\windows\system32\shutdown.exe\" /s pc1" /ST 02:45:00 /SD 09/14/2007 /RU
SYSTEM"

in this case I am trying to target different machines in the domain. I jst
found out I need the " in there, previously I could create the event on the
target PC but it wouldn't run, then I could create an event on the DC which
is not intentional.

Thanks for your help!!
 
Re: suing MS for damages because of at or schtasks to run remote s

Re: suing MS for damages because of at or schtasks to run remote s


"totoro" <totoro@discussions.microsoft.com> wrote in message
news:A3954ABF-9B95-41D2-8D4B-9C69830A33C9@microsoft.com...
>
>
> "Pegasus (MVP)" wrote:
>
>> No, there is no issue with shutdown.exe, documented or otherwise.
>> The problem lies with your command. Let's have a look at it!
>>

>
> I think my issue is understanding where the " should be in the statement:
>
> schtasks.exe /create /SC DAILY /TN shutoff /TR
> "\"C:\windows\system32\shutdown.exe\" /s pc1" /ST 02:45:00 /SD 09/14/2007
> /RU
> SYSTEM"
>
> in this case I am trying to target different machines in the domain. I jst
> found out I need the " in there, previously I could create the event on
> the
> target PC but it wouldn't run, then I could create an event on the DC
> which
> is not intentional.
>
> Thanks for your help!!


You need to get rid of several superfluous double quotes and slashes:

schtasks.exe /create /SC DAILY /TN shutoff /TR
C:\windows\system32\shutdown.exe /s pc1 /ST 02:45:00
/SD 09/14/2007 /RU SYSTEM
 
Back
Top