Another excellent way to schedule tasks would be the microsoft Jt.exe tool
coupled with the robocopy.exe also free we can make this quite easy
--------------------------
Create a VBS script that contains the following....
Dim OpSysSet, OpSys
Set OpSysSet = GetObject("winmgmts:{(Shut
For Each OpSys In OpSysSet
OpSys.Reboot()
Next
This is the script that will reboot your machine
--------------------------
Download robocopy.exe from the Windows 2003 rescource kit (http://www.microsoft.com/
and jt.exe from Windows 2000 Resource Kit (http://www.microsoft.com/
Put the JT.exe, Robocopy.exe and the vbsscript (say reboot.vbs for this example) on the root of the C Drive (C:)
now create a .cmd file by renaming the .txt part of a text file .cmd and right click and get properties...
and type.....
--------------------------
@Echo Off
SET PCLIST="C:\PCLIST.txt"
FOR /F %%a IN (%PCLIST%) DO CaLL :DODEL %%a
GOTO :EOF
:DODEL
SET PANAME=%1
ECHO %PCNAME%
C:\Robocopy.exe "C:" "\\%PCNAME%\c$\Temp" "reboot.vbs" /r:3 /w:3
C:\Robocopy.exe "C:" "\\%PCNAME%\c$\Temp" "jt.exe" /r:3 /w:3
JT.exe /saj NAMEFORSCHEDULE /sc DOMAIN\Username PASSWORD" /sj ApplicationName="C:\Temp\r
--------------------------
This seems complicated but its not
Then just put the PCNAMES in the txt file PCLIST.txt that you creates on the C: Drive and double click the script....this will schedulked the reboot at 3am every day
Regards
Michael
(Put pcnames in the format...ie.giong down not across
SERVER01
PCNAME01
LAPTOP01
)
Main Topics
Browse All Topics





by: NJComputerNetworksPosted on 2005-07-15 at 11:04:05ID: 14453449
I think you might want to create a script to do this:
In your script use the AT command to do the scheduling...
C:\Documents and Settings\me>at /?
The AT command schedules commands and programs to run on a computer at
a specified time and date. The Schedule service must be running to use
the AT command.
AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]
AT [\\computername] time [/INTERACTIVE]
[ /EVERY:date[,...] | /NEXT:date[,...]] "command"
\\computername Specifies a remote computer. Commands are scheduled on the
local computer if this parameter is omitted.
id Is an identification number assigned to a scheduled
command.
/delete Cancels a scheduled command. If id is omitted, all the
scheduled commands on the computer are canceled.
/yes Used with cancel all jobs command when no further
confirmation is desired.
time Specifies the time when command is to run.
/interactive Allows the job to interact with the desktop of the user
who is logged on at the time the job runs.
/every:date[,...] Runs the command on each specified day(s) of the week or
month. If date is omitted, the current day of the month
is assumed.
/next:date[,...] Runs the specified command on the next occurrence of the
day (for example, next Thursday). If date is omitted, the
current day of the month is assumed.
"command" Is the Windows NT command, or batch program to be run.
For the shutdown, use the SHUTDOWN command:
C:\Documents and Settings\me>shutdown /?
Usage: shutdown [-i | -l | -s | -r | -a] [-f] [-m \\computername] [-t xx] [-c "c
omment"] [-d up:xx:yy]
No args Display this message (same as -?)
-i Display GUI interface, must be the first option
-l Log off (cannot be used with -m option)
-s Shutdown the computer
-r Shutdown and restart the computer
-a Abort a system shutdown
-m \\computername Remote computer to shutdown/restart/abort
-t xx Set timeout for shutdown to xx seconds
-c "comment" Shutdown comment (maximum of 127 characters)
-f Forces running applications to close without war
ning
-d [u][p]:xx:yy The reason code for the shutdown
u is the user code
p is a planned shutdown code
xx is the major reason code (positive integer le
ss than 256)
yy is the minor reason code (positive integer le
ss than 65536)