Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
How to Configure Schedule Task to Invoke Cisco AnyResLive API via WGET
Sometimes we need to restart the encoding channel in a regular basis, i.e daily or weekly. On the CMP encoder, this can be done through configuring some schedule events. But the schedule could happen in the 2 recurring types: Daily & Weekly.
This document will introduce the steps to configure Schedule Task to invoke API to restart the encoding channel/stream in a more flexible frequency.
The same procedures can be applied to invoke any other functions provided by the Cisco AnyResLive (Spinnaker Message Service) API.
- Administrator access to the Cisco AnyResLive encoder
- Understanding of how the Batch file and script work on Windows
2, After installing wget on the encoder, add the path “C:\Program Files\GnuWin32\bin” to the system Variable
3, Enable the Message Service from the Encoder management GUI: System-->Message Service
4, Create a folder C:\Schedule_Restart_Channels under C drive. Under folder created, create XML file named: Restart_Channel1.xml (more xml files could be created if needed) copy the below content into the files, the only thing need to change for each channel is the <Channel> item below:
Notes: <GUID> could be any value, the default one in the file should be fine <Traget> please use the computer name of the Encoder <Channel> Put the channel number for which needs to be restarted <Stream> Put 0 here so it will restart all the streams under the channel
5, Under folder created in step 3, create a batch file Restart_Channels.bat with the below content
@echo off for /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
- Please change the ip address of the encoder accordingly.
- The --post-file option needs to use the XML file created in step 4, if there are more than 1 XML file to be used then please create more lines to run wget accordinly - The restart status will be saved under the same folder in XML file named: Restart_Status_ch<x>_<date>.xml
6, Create a Windows schedule event: Control Panel —> Scheduled Task, select the batch file created in step 5 to execute (now it can be scheduled to happen once a weekly only). When it requires to enter the password, please input the password for the admin user.
1) Check the restart status XML files created under the folder: C:\Schedule_Restart_Channels, the XML file will have the response result: <Response> <Result>Restart successful</Result> <Error>0</Error> </Response>
2) Check the application log on the encoder, the following information type event (SMS Message Received) will be recorded: