Using a batch file, you can monitor and restart your Scribe Insight services without manual intervention.
Following is a Windows batch file that checks the Scribe Insight services on a timed frequency and automatically starts any of the 5 Scribe Insight services that is not running – without any user interaction.
for /F "tokens=3 delims=: " %%H in ('sc query "Scribe MonitorServer" ^| findstr " STATE"') do (
if /I "%%H" NEQ "RUNNING" (
net start "Scribe MonitorServer"
))
for /F "tokens=3 delims=: " %%H in ('sc query "Scribe MessageServer" ^| findstr " STATE"') do (
if /I "%%H" NEQ "RUNNING" (
net start "Scribe MessageServer"
))
for /F "tokens=3 delims=: " %%H in ('sc query "Scribe EventManager" ^| findstr " STATE"') do (
if /I "%%H" NEQ "RUNNING" (
net start "Scribe EventManager"
))
for /F "tokens=3 delims=: " %%H in ('sc query "Scribe BridgeServer" ^| findstr " STATE"') do (
if /I "%%H" NEQ "RUNNING" (
net start "Scribe BridgeServer"
))
for /F "tokens=3 delims=: " %%H in ('sc query "Scribe AdminServer" ^| findstr " STATE"') do (
if /I "%%H" NEQ "RUNNING" (
net start "Scribe AdminServer"
))
To use this code:
- Copy the batch file script into a text file, such as Notepad, and save it as InsightServices_Check.bat, on the Scribe server. Save the file in a folder such as C:\Users\Public\Documents\Scribe\Collaborations\Default.
- Open the Control Panel and navigate to Administrative Tools, and open the Task Scheduler.
- Create a Basic task:
- Name the task Insight Services Check.
- Specify the task trigger for the task.
- Specify when you want the task to start running.
- Specify starting the batch script you created as the action the task starts.
- Review the task summary and finish the task creation.
For additional information, see the following in the Scribe Insight Help: