To mitigate the maintenance effort of the Domino server
Decide to restart the Domino service on a daily basis with batch scripts
The following batch work:
1. Send quit exit instructions to Domino console first
After 2, 30 seconds, check to see if Domin has not exited successfully. If it is successfully launched, proceed to the next step. Otherwise, forcibly shut down the domino process.
After 3, 30 seconds, check to see if the Word template file process exists. If present, the word process is forcibly closed. If it does not exist, continue.
4, the end of the script run.
Add this batch script to the scheduled task to adjust the execution time as needed.
--------------------------------------------------------------------------------------------------------------- ---
@echo off
Echo ********************************************************
Echo Domino Service Restart Batch
echo Hardair @ 2011/08/18/17/19/00
Echo ********************************************************
Echo.
: Checkdomino
Echo detects if Domino process exists ...
Echo.
TASKLIST/NH | find/i "Nserver.exe"
if errorlevel 1 (goto Nofinddomino) Else (goto Killdomino)
: Killdomino
Echo.
Echo detects the domino process, sends an exit command to the Domino console, and waits 30 seconds ...
G:\Lotus\Domino\nserver.exe-c "Quit"
REM Uses ping delay
Ping 127.0.0.1-n > nul
Echo.
Echo forces the Domino service off and waits 30 seconds ...
Echo.
taskkill/f/im Nserver.exe
REM Uses ping delay
Ping 127.0.0.1-n > nul
Goto Checkword
: Nofinddomino
Echo.
Echo did not detect the domino process.
: Checkword
Echo.
Echo detects if Word processes exist ...
Echo.
TASKLIST/NH | find/i "WINWORD.exe"
if errorlevel 1 (goto Nofindword) Else (goto Killdword)
: Killdword
Echo.
Echo detects the word process, forces the word process to close, and waits 30 seconds ...
Echo.
taskkill/f/im WINWORD.exe
REM Uses ping delay
Ping 127.0.0.1-n > nul
Goto END
: Nofindword
Echo.
Echo does not detect the word process.
: End
Echo.
Shutdown–f–r–t 0
Echo.
echo Batch Run complete!
Echo.
REM Pause