Setting up auto start and stop for IBM CLM tools on Windows
We’ve blogged before about starting the CLM components on Linux/Unix. Now let’s talk about staring it (and stopping it) on Windows platforms.
The vast majority of the servers we deploy to are Linux. It’s just plain easy to install and configure everything via command line (certainly after many years of experience). However, Windows is (are?) still the preferred platform for many customers. The IBM documentation is nearly silent on auto start or shutdown upon system reboot.
Server Startup
Startup is pretty simple, and you may already know this. First open the Windows Task Scheduler.
Create a basic task. Name this CLM Startup (or RTC Startup, or DNG Startup, etc.). Click Next.
On the next screen for the trigger, select When Computer Starts. This means this will execute immediately after Windows boots up. Click Next.
On the next screen, specify the action Start a program. Click Next.
This next screen is where you point to the server.startup.bat file.
Finally, here is the summary screen. Once you click finish, your CLM environment should be ready to start on each reboot. No more manual starts!
So, that’s fine and dandy, and shutdown should be just the same. Right?
Wrong.
Notice from the Trigger screen above that there is no event for shutdown? Uh Oh. You want to shut down the server gracefully. If you just allow the system to kill the task when the operating system shuts down, you can run into issues such as corruption of the database, or database indexes.
Server Shutdown
First, click the Create Task button in the task scheduler.
On the next screen, which will be different than the wizard above, name the new task CLM Shutdown (or RTC shutdown, DNG shutdown , etc.).
Next, click on the Triggers tab, and the click to add a new trigger.
This is the key part. As the Shutdown event is not in the wizard, we will use the event ID in a custom trigger. These options can be used for calling any batch file, by the way! Specify the following options.
- Type : On Event (Basic)
- Log : System
- Source : User32
- EventID : 1074
Click OK. Now, click on the Actions tab, and we will add a new action. For your program script, browse to the server.shutdown.bat file in your JazzTeamServer\server directory. Click OK on this dialog, and OK on the next. Your server is now ready to start on boot and stop on shutdown without manual intervention.