@echo off
for %%C in (server1, server2, server3) do (
schtasks /Create /F /S %%C /RU "System" /SC OnStart /TN StartSvc /TR "C:\Windows\System32\sc.exe start TheServiceName" /delay 0005:00
)
This will create the task on 3 machines, triggered 5 minutes after boot.
@echo off
for %%C in (ksolpc01) do (
schtasks /Create /F /S %%C /RU "System" /SC OnStart /TN StartSvc /TR "C:\Windows\System32\sc.exe start ALG" /delay 0005:00
)
And yes, the 005:00 corresponds to "5 minutes after boot".
@echo off
for %%C in (ksolpc01) do (
schtasks /Create /F /S %%C /RU "System" /SC OnStart /TN StartSvc /TR "C:\Windows\System32\sc.exe start """ATM Jboss 4.2.3"" /delay 0005:00
)
@echo off
for %%C in (ksolpc01) do (
schtasks /Create /F /S %%C /RU "System" /SC OnStart /TN StartSvc-Jboss /TR "C:\Windows\System32\sc.exe start """ATM Jboss 4.2.3"" /delay 0005:00
schtasks /Create /F /S %%C /RU "System" /SC OnStart /TN StartSvc-NP /TR "C:\Windows\System32\sc.exe start """NP"" /delay 0005:00
schtasks /Create /F /S %%C /RU "System" /SC OnStart /TN StartSvc-SCHDLR /TR "C:\Windows\System32\sc.exe start """SCHDLR"" /delay 0005:00
)
That presumes there is no particular order needed to start the services. If you need to make sure one service is running before starting another, change the delay accordingly, e.g. by adding one minute per service.
NET START servicename
just add this into your startup batch file.