Today, I had quite a bit of fun writing and debugging a weekly maintenance script.

I use this on all of my normal servers, but today, fine tuning this for a partitioned Domino server became a little bit of a challenge.
Tailoring all of the command line input from each of the different commands took a little bit of research.

I also found other bits on the input method for nserver.exe, ncompact.exe, and nfixup.exe on the Notes/Domino 6 and 7 forum:

I should also say that I’ve been using this for years, but added the drop all and dbcache flush to help the server shutdown quicker. I got those from the maintenance script over at openntf.org. The rest of it, I came up with myself over the years.

Here is a .zip file which contains the 3 batch files I use. satjob.bat is called by the AT.exe scheduler in Windows 2003. This .zip file contains the batch maintenance for a NON-PARTITIONED server.maintain.zip

@REM THIS SECTION DELETES THE DTF FILES THAT ARE TEMP FILES CREATED BY DOMINO
@REM THESE ARE CREATED IN THE C:\windows\TEMP DIRECTORY BECAUSE OF THE NOTES.INI VARIABLE
@REM View_Rebuild_Dir=c:\windows\temp or because c:\windows\temp is set in the environment
@REM variables as the system temp directory

4 Responses to “Fun writing a maintenance script”

I run ncompact on the client side but i am having an issue that does not allow me to set the script to run on its own. For one reason or other, i need to run ncompact in multiple directories (3 to be exact). ncompact’s arugments allows for one directory (recursive) at a time.
So fine, my batch file loops trhough the directories (the base ones) and runs the 3 or as many as i need. The problem is the password.
Because i am running this on the client side (for the client copy) i need to enter the password, and i cannot find ANY possible way to enter it just once, such as getting it when first running (via set /P) and passing it as an argument.
Do you know of ANY way (out side of single client logon, which may do it but i don’t want to use), that i can pass the password as an argument of ncompact?

I typically just reboot windows at this point and we have Domino set to start up automatically as a service.

If you download the maintain.bat file up at the top of the post and unzip it you will find 3 batch files.

satjob.bat
maintain.bat
reboot.bat

Call satjob.bat with your scheduler, and the rest will happen automatically.

Look at the contents of reboot.bat to see how to re-boot Windows machines.

However, if you just want to restart the service, you can do it with either of these commands:
NET START “Lotus Domino Server (lotusdirectory)”
NET START “Lotus Domino Server (lotusnotesmon)”
NET START “Lotus Domino Server (lotusnotessmtp0)”