[quote name='bigfootxl' post='1178' date='December 2 2008, 09:31 AM']Hi Patrick,
Great script you got there but how do I implement this in DU? Could you give me some hints?
Stefan[/quote]
Hello,
You would need to create a CL_INT uproc, with a script that will look likes :
[code]echo test
cscript.exe test.vbs nodename servicename 30
set resexe=%ERRORLEVEL%[/code]
For example :
[code]echo test
cscript.exe test.vbs frwpmglc INT533_frwpmglc_ORD_X 30
set resexe=%ERRORLEVEL%[/code]
it will shutdown the service INT533_frwpmglc_ORD_X and wait for 30 seconds.
What I did here is the simpliest script possible, and I would not recommend to do that in production
![]()
/wink.png' class='bbc_emoticon' alt=';)' />
I think that in production you will need to add way more tests.
For example, add a timeout on your VBS execution.
It will kill the vbs script if it hangs for too long (depending on the timeout value you provided), by adding the parameter:
//T:%TIMEOUT%
[code]echo test
set TIMEOUT=200
cscript.exe test.vbs frwpmglc INT533_frwpmglc_ORD_X 30 //T:%TIMEOUT%
set resexe=%ERRORLEVEL%[/code]
Or you could also add some more tests like :
check if the service is started before trying to shutdown him
check if any jobs are running ...
etc
![]()
/smile.png' class='bbc_emoticon' alt=':)' />
I'm sure Professionnal Services could also help you there
Guillaume