cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
371
Views
0
Helpful
1
Replies

Schedule Unity services to stop and start

vinhnguyen
Level 1
Level 1

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

1 Reply 1

lindborg
Cisco Employee
Cisco Employee

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)– that’s OK, it’ll 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 don’t kill that it’ll start the gateway up again on it’s own – it’s 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, everything’s 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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: