BOXI - Script to start / stop servers

BOXI - Script to start / stop servers

Posted By: pmietlicki

Published to Business Objects on Jul 22, 2017

Script available in this archive file :

This BAT script will launch your SIA, adapt it to your installation by modifying the Server Intelligence Agent (BOXI) with the name of your CMS (replace BOXI by yours) :

REM Script to start stop BOXI SIA de BO 
REM action must be start or stop
set action=%1
REM if the parameter is wrong exit
if NOT "%action%"=="start" (if NOT "%action%"=="stop" (exit /B))
REM We begin with the BOXI SIA BOXI that contains the CMS
net start | find "Server Intelligence Agent (BOXI)" > nul 2>&1
REM If errorlevel greater or equel to 1 the program is not working
REM If cms is active and the command is start, we exit
if ERRORLEVEL 1 ( set cmsenmarche=0 ) else ( set cmsenmarche=1 )
REM If cms is already stopped and the command is stop, exit
if "%action%"=="stop" (if %cmsenmarche%==0 ( exit /B ) )
REM If the cms is already started and command is start, exit
if "%action%"=="start" (if %cmsenmarche%==1 ( exit /B ) )
REM We start or stop server, if cms is inactive
if "%action%"=="stop" (net stop "Server Intelligence Agent (BOXI)")
if "%action%"=="start" (net start "Server Intelligence Agent (BOXI)")

You'll have to schedule it (with the scheduled tasks under Windows) with the parameter "start" or "stop". You'll have to create 2 tasks, one that starts all (during the morning for example) and one that stops all (by night for example). Between this time you'll be able to schedule database backup and the backup of your files inside the FRS (File Repository Server).

Tags: BO, BOXI