Angus Macdonald <> wrote on Friday, March 23, 2007 10:30 AM: Yeah, schtasks didn't do a good job stopping the running task. Will look into jt instead. Thx. > jt.exe also allows you to specify a timeout value. > > -----Original Message----- > From: windows2000-bounce@xxxxxxxxxxxxx > [mailto:windows2000-bounce@xxxxxxxxxxxxx]On Behalf Of Sorin Srbu > Sent: 22 March 2007 11:41 > To: windows2000@xxxxxxxxxxxxx > Subject: [windows2000] Re: Pushing a scheduled job to all computers on a > domain > > > Sorin Srbu <> wrote on Thursday, March 22, 2007 9:03 AM: > > It just occurred to me, that one needs a way to stop the defrag task, or > else it will defrag in a worst case scenario for 72hrs, which is the default > termination timeout of tasks added. > > The way to do it is to apparantely deploy a new task with the command > schtask /end. It's described in the windows help. Syntax as follows: > > --- > Syntax > schtasks /end /tn TaskName [/s computer [/u [domain\]user /p password]] /? > > Parameters > /tn TaskName > Identifies the task that started the program. This parameter is required. > > /s Computer > Specifies the name or IP address of a remote computer (with or without > backslashes). The default is the local computer. > > /u [domain\]user > Runs the command with the permissions of the specified user account. By > default, the command runs with the permissions of the user logged on to the > computer running SchTasks. > > /p password > Specifies the password of the user account specified in the /u parameter. > This parameter is required when the /u parameter is used. > > /? > Displays help. > --- > > For me it'd be something like: schtasks /end /tn at1 /ru "" > > And set it to run three or so hours after the defrag started. The /ru "" > would indicate that the system account should be used. > > > >> Ray Costanzo <> wrote on Wednesday, March 21, 2007 12:26 PM: >> >> Made it work, thx Ray! >> >> It was all a question of missing paranthesis here and there. >> >> >>> Hi Sorin, >>> >>> How are the computers in the text file? Just one computer name per line >>> and nothing else? If so, you can enter something like this at the command >>> prompt to schedule your file every Monday at 8:30 AM. >>> >>> for /f %a in (D:\computers.txt) do (at \\%a 8:30 /every:M >>> C:\Path\To\file.vbs) >>> >>> This is just to be entered at the command prompt. If you were to put it >>> into a .cmd (or .bat) file, the two places where you see %a would have to >>> become %%a instead. >>> >>> Note that D:\computers.txt is the path on your machine to your text file >>> of computers. Note that C:\Path\To\file.vbs is the local path on the >>> remote machine. By default, the AT account runs as the local system, so >>> you can't put your target file on a network share, since AT won't have >>> rights to it. So, you'd have to copy the file out to everyone's machine. >>> >>> Ray at work >>> >>> >>> >>> >>>> -----Original Message----- >>>> From: windows2000-bounce@xxxxxxxxxxxxx [mailto:windows2000- >>>> bounce@xxxxxxxxxxxxx] On Behalf Of Sorin Srbu >>>> Sent: Wednesday, March 21, 2007 5:23 AM >>>> To: windows2000@xxxxxxxxxxxxx >>>> Subject: [windows2000] Re: Pushing a scheduled job to all computers on a >>>> domain >>>> >>>> Dave stevens <> wrote on Wednesday, March 21, 2007 10:07 AM: >>>> >>>> Yupp, seems like the at command will do the thing. I don't however >>>> understand how to tell it to use the computernames I have in the >>>> txt-file. >>>> >>>> Some kind of loop like "run this command on the computers in the list" >>>> would be suitable. I recall some "for in %%..." something or other >>>> command in batch scripting, but can never remember how to... >>>> >>>> >>> >>> >>> ***************************** >>> New Site from The Kenzig Group! >>> Windows Vista Links, list options >>> and info are available at: >>> http://www.VistaPop.com >>> ***************************** >>> To Unsubscribe, set digest or vacation >>> mode or view archives use the below link. >>> >>> http://thethin.net/win2000list.cfm >> >> ***************************** >> New Site from The Kenzig Group! >> Windows Vista Links, list options >> and info are available at: >> http://www.VistaPop.com >> ***************************** >> To Unsubscribe, set digest or vacation >> mode or view archives use the below link. >> >> http://thethin.net/win2000list.cfm > > ***************************** > New Site from The Kenzig Group! > Windows Vista Links, list options > and info are available at: > http://www.VistaPop.com > ***************************** > To Unsubscribe, set digest or vacation > mode or view archives use the below link. > > http://thethin.net/win2000list.cfm > ***************************** > New Site from The Kenzig Group! > Windows Vista Links, list options > and info are available at: > http://www.VistaPop.com > ***************************** > To Unsubscribe, set digest or vacation > mode or view archives use the below link. > > http://thethin.net/win2000list.cfm ***************************** New Site from The Kenzig Group! Windows Vista Links, list options and info are available at: http://www.VistaPop.com ***************************** To Unsubscribe, set digest or vacation mode or view archives use the below link. http://thethin.net/win2000list.cfm