Schedule Restart of CUCM service in CLI or GUI

Unanswered Question
Jan 10th, 2010

Hi there,

Is there a way to Schedule a restart of a Service in CUCM 6.1?

I would like to restart this service below automatically every fortnight or so.. I cant find anything in the CLI or the GUI that will do it..

admin:utils service restart Cisco CallManager Attendant Console Server



I have this problem too.
1 vote
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Jaime Valencia Sun, 01/10/2010 - 20:19

There is no way to do that on CUCM, you would need to write down a custom program to SSH into the server, log in, and issue the command.

But natively within the CUCM server there is no way to do that.

Nice idea, it certainly would be possible via the linux shell to try something like that, but not via the CLI we provide.

You might get in touch with your AM and submit a PER if you're interested in this.



if this helps, please rate

dneggers1 Sun, 01/10/2010 - 20:25

Thanks Java,

I will write a script to login and issue the command..

Many thanks,


msprocket Thu, 05/23/2013 - 07:05

Was you able to write a script to do this. I have a need to reboot our CUPS server on a schedule bases. I did write a script that will shh the server and login and issue the command Utils System restart. My issue is I can not get the script to pass the "yes" to the server when ask "are you sure you want to restart".



vivek.dubey Wed, 09/25/2013 - 04:25

for /f %%i in (rl.txt) do echo y | c:\putty\plink.exe

the "echo Y" will provide the yes option for every time you login to devices in rl.txt file.

Vivek Dubey

Derek Bovard Fri, 07/17/2015 - 08:11

The Y does not need to be echoed once you answer Y once and let it write credentials to the registry in Local User. Then you can export these reg entries and use "reg add" and add these to your bat file so if other users need to use it they will not even get prompted for Y/N at login. Also for CUCM and UCCX to run multiple commands you will need hundreds of "enters" between the commands. So for example line 1 would be the CLI command, then 100-1000 enters, then second command. The amount of enters needed differs depending on the output. Usually 300 will work with anything, if not add more, I've had to use 1000+ before it runs the second command. Also you will need to run EXIT as the last command or plink will never finish. I use the following command below. This will parse out the extra Admin: prompts you will when using many enters. Also note the -m switch to run multiple commands doesn't work as advertised.Notice how I use the < symbol to redirect the .txt file with the commands into the plink.exe command. You can try adding the Echo Y^| at the beginning of the plink command to answer Y to login prompt, I had some luck, but importing the reg entry it adds automatically is the best solution. Cisco IOS doesn't seem to have these issues but with Cisco CUCM and CCX this is the only way it works.

for /f "tokens=*" %%a in ('plink 2^>nul -ssh -pw password -l username IP ^< ShowNetEth0.txt^|find /v "admin:"') do echo %%a

LARRY LARSEN Tue, 07/07/2015 - 12:49

Did you ever get this to work?  I cant seem to figure out plink and passing the Y.

Dragan Markovic Wed, 07/22/2015 - 02:28

Hi Larry,

I made a small Python code which shuts down CUCM. It should be run on a separate server. You can use "pexpect" library to login to CUCM via SSH and send "utils system shutdown", than wait for "Enter (yes/no)?" and finally send "yes". Something like this:

import pexpect
import sys
server_ip = "<CUCM IP>"
server_user = "<platform user>"
server_pass = "<platform pass>"
child = pexpect.spawn('ssh %s@%s' % (server_user, server_ip))
child.logfile = sys.stdout
child.timeout = 60
child.sendline('utils system shutdown')
child.expect('Enter (yes/no)?')
child.expect(' Appliance is being Powered - Off ...')
print 'Shutdown command successfully sent.'


This Discussion

Related Content