Das Notes Forum

Lotus Notes / Domino Sonstiges => Tipps und Tricks => Thema gestartet von: Meff am 13.08.02 - 17:32:38

Titel: Starten & Stoppen eines Server mittels Batchfile
Beitrag von: Meff am 13.08.02 - 17:32:38
Hallo Forum,

hab ich bei LDD gefunden :

Want an easy way to start and stop your local Domino server on Windows NT, 2000, or XP? Use a batch file! To create a batch file, use a text editor, like Notepad, to create a file, then copy the following code to the file. Make sure that the service name, including the name in parentheses, appears exactly as it does on the operating system. On some systems, the text in parentheses appears as "dominodata." Open the Services window to check the Domino service name.

@echo off
if /i "%1" EQU "start" goto start
if /i "%1" EQU "stop" goto stop
goto usage
net start server
net start "Lotus Domino Server (LotusDominoData)"
goto end
net stop "Lotus Domino Server (LotusDominoData)"
net stop server
goto end
echo Batch file for starting and stopping the Domino service.
echo The Server service is started and stopped with Domino for security reasons.
echo Edit the file 'domctrl.bat' if your Domino service has been renamed,
echo which may be the case with partitioned servers.
echo Usage: domctrl [start^|stop]
echo start tries to start the Server service and then the Domino service
echo stop tries to stop the Domino service and then the Server service

Save the file. In this example, we use the file name domctrl.bat. You can save the file anywhere on your server. Next, create two shortcuts on your desktop: one to start the server and one to stop the server. To create the shortcuts:
Open your Windows Desktop.
Right-click, and then choose New - Shortcut to open the Create Shortcut dialog box.
To create a shortcut that starts your Domino server, go to the Command line field and enter the path to the batch file followed by the command "start." For example, if your batch file resides in the C:\Lotus directory, enter the following:
C:\Lotus\domctrl.bat start
Click Next, and then enter a name for the shortcut.
Click Finish.
Repeat steps 2 through 5 to create a shortcut that stops your server. In the Command line field, browse to or enter the path to the batch file followed by the command "stop." Here's an example:
C:\Lotus\domctrl.bat stop

If you want to add the shortcuts to your taskbar, drag-and-drop the desktop icons onto the taskbar. If you include the file in your path, you can access it from the command-line.

Das ganze kann man mit Sicherheit auch über den Scheduler machen, z.B. für den Backup.

Meff ;)