Restart SwyxWare services periodically (kb2306)
The information in this article applies to:
- SwyxWare from version 3
Under very rare circumstances it can be useful to restart all SwyxWare services periodically. This article describes how to do this.
Note: SwyxWare v4.0 and newer has a special Watchdog-Service which checks if SwyxWare is working properly and which restarts SwyxWare if necessary. There's no need for a periodic restart at all.
Under certain circumstances a periodic shutdown and restart of SwyxWare may be useful. Normally the best way to achieve this is to set up an automated task that restarts SwyxWare at night or at another time with as few users affected as possible. The downtime due to the restart will be less than one minute.
The simplest way to have SwyxWare restarted periodically is to generate a batch file that contains the necessary commands and have it executed by the Windows2000 Server once every night. The batch file should contain following sequence of commands:
@echo off net stop phonemgr net stop itspmgr net stop ippbxgate net stop linkmgr net stop conferencemgr net stop ippbxsrv net start ippbxsrv net start conferencemgr net start linkmgr net start ippbxgate net start itspmgr net start phonemgr
You can find this file as IpPbxRestart.bat in directory \Tools on the SwyxWare CD. Please copy it to a reasonable location, e.g. the SwyxWare installation directory.
Windows 2000 (just like Windows NT4.0 before) offers the possibility to execute programs or batch files periodically. Please run the Scheduled Tasks application from the Windows 2000 Control Panel. A list of already planned tasks appears containing an icon named Add Scheduled Task. Please double click this icon to run the task wizard. Just click on next in the window that appears first. In the next dialog you can choose the program that has to be started periodically, in this case the IpPbxRestart.bat batch file. Since the batch file does not appear in the list of registered programs, you have to click on browse and select it manually.
The next two dialogues gather information about the interval and about the exact time for the periodic execution. You should select a daily run, suggestively in the second half of the night when it is very unlikely to interrupt important phone calls.
In the following dialog you are asked for the user account the batch file will run under. Please make sure to enter the name and password of a user with local administrator rights, because the SwyxWare components are services that cannot be stopped and started without such rights!
After finishing the wizard you should see a new task named RestartSwyxWare in the list of scheduled tasks.
To remove the automatic restart from the list later, you can simply select the entry and delete it like you would delete a file. It is also possible to deactivate the task temporarily. To do this, right-click on the task and select Properties from the context menu. In the properties of the task you will find a checkbox that is labeled Enable. If you deselect this checkbox, the task will not run until you re-enable it.