02-03-2003 09:40 PM - edited 03-12-2019 10:32 PM
I need to do a manual stop of Unity everynight and start it again an hour later. I try to automate the process by writing the script
net stop avcsmgr
net stop avrepdirsvrsvc
net stop avttssvr
net stop avumrsyncsvr
and use scheduler software. However all the services stop OK except for avcsmgr which give an error
System Error 1067 has occurred.
The process terminated unexpectedly.
I downloaded the Unity tool - Schedule Unity restart but it does not allow the services to stop and start an hour later.
Please help
02-03-2003 11:12 PM
Yeah, I didn't think to add a "delay" in there to keep Unity off line for a set period of time before bringing it back up - that wouldn't be too difficult to add. I'll do that the next time I crack it open.
I pulled some of the code out for the actual shut down and startup process - the thing about taking Unity down is doing things in the right order - if you go right for the AvCsMgr she'll kick on you... you have to sneak up on her.
This needs to work for all versions and configurations of Unity so it includes some services that may or may not be on the box (i.e. the Bridge Connector service) thats OK, itll just blow through them.
I first stop Unity using the gateway this requires a COM interface which you wont be able to do via a script this just means any active calls get terminated rudely. Other than that there's no reason this can't be done in script just fine.
==================
"Net Stop AvDirChangeWriter
"Net STop AvDSGlobalCatalog"
"Net Stop AvCsGateway"
"Net Stop AvcsMgr"
"Net Stop AvDSAD"
Net Stop AvDSGlobalCatalog"
Net Stop AvGAENsvr"
"Net Stop csBridgeConnector"
"Net Stop AvMsgStoreMonitorSvr"
"Net Stop AvRepDirSvrSvc"
Net Stop AvUMRSyncSvr"
"Net Stop AvTTSSvr"
'now use kill to make sure we take EVERYTHING off line this also takes the tray status icon out which is important since if you dont kill that itll start the gateway up again on its own its very persistent. The f means force here in case any service decides not to go quietly. Insert the proper path here.
"c:\commserver\kill.exe f av*.*"
OK, everythings off line so. The next section is the startup sequence.
"Net Start AvCsGateway"
"Net Start AvDSAD"
"Net Start AvDSGlobalCatalog"
"Net Start AvGAENSvr"
"Net Start AvDirChangeWriter"
"Net Start AvMsgStoreMonitorSvr"
"Net Start AvLic"
"Net Start AvUMRSyncSvr"
"Net Start AvTTSSvr"
"Net Start AvRepDirSvrSvc"
'Start tray icon again insert the appropriate path name here
Shell c:\commserver\AvCsTrayStatus.exe"
Unity should be back up and running
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide