The Events tab defines the program(s) to be run during service startup and service shutdown.
Launch Events and Termination Events programs are always run during service start-ups, controlled shutdowns, and intentional restarts. However, in certain situations, certain Termination Events programs may not be run - refer to Disposition below.
Note: Launch Events and Termination Events programs run at the same priority as the main service. The priority is defined on the Settings tab.
Event programs will run for a finite time. Multiple Launch Event programs and Termination Event programs may be defined. The programs are executed in top-down order. The programs in the Launch Events list are run at the time the service is started. The programs in the Termination Events list are run at the time the service is stopped.
If the Event programs run for an unusually long period of time, the Service Control Manager may consider the service to have frozen.
If the service is configured as a Console Application on the Lifecycle tab, the Launch Events and Termination Events programs will be terminated as if they were console applications. Otherwise, they will be terminated as if they were GUI applications.
FireDaemon Pro automatically provides a set of standard FD environment variables to each Launch and Termination Event program - for details refer to About Environment Variables.
The following table describes the functions provided on the Events tab. The same functions are separately provided for Launch Events and Termination Events.
Button | Description |
---|---|
Promote (Up Arrow) | Moves up (promotes) the currently selected entry to a higher position in the programs list. |
Demote (Down Arrow) | Moves down (demotes) the currently selected entry to a lower position in the programs list. |
Insert | Inserts a new program definition immediately above the current position in the programs list. For more information about the Event Information dialog box, see Launch / Termination Event. |
Append | Adds a new program definition to the end of the programs list. For more information about the Event Information dialog box, see Launch / Termination Event. |
Edit | Edits the currently selected program in the programs list. In the list, select the program that you want to edit and click the Edit button. A program definition can also be edited simply by double-clicking on its list entry. For more information about the Event Information dialog box, see Launch / Termination Event. |
Remove | Deletes the currently selected program from the programs list. Note: The program definition is immediately removed. No confirmation prompt is displayed. |
Launch / Termination Event
On the Events tab, when you click the Insert or Append or Edit button, the Event Information dialog box appears for the Launch Event program and Termination Event program.
Launch Event
Termination Event
When a program is set to run before the event, the following applies:
- For Launch Event programs, the Event program is started and runs to completion. The service is then started.
- For Termination Event programs, during an intentional shutdown, the Event program is started and runs to completion. The service is then stopped.
When a program is set to run after the event, the following applies:
- For Launch Event programs, the Event program is started immediately after the service has been started.
- For Termination Event programs, after the service has stopped or finished, the Event program is started and runs to completion.
Note: Termination Event programs are not executed in certain situations - see Disposition below.
The following table describes the fields provided on the Event Information dialog box.
Field | Description |
---|---|
Disposition | This field determines when to run the Event program. The following options are available for Launch Event programs:
The following options are available for Termination Event programs:
Note: FireDaemon Pro does not run certain Termination Event programs in certain situations:
For details about which Event programs are executed in various launch scenarios, refer to FireDaemon Pro Events and Triggering Points |
Program | The full path and name (including the file extension) of the Event program. For example, C:\Program Files\myProgram\program.exe |
Working Directory | The working directory of the Event program. This must be a valid path on the local disk or a Universal/Uniform Naming Convention (UNC) path to a network drive. Note: There are a significant number of caveats associated with using UNC paths. Be warned! |
Parameters | The optional list of command line parameters that are passed to the Event program. If any parameter contains whitespace characters, it must be quoted, e.g. "string with spaces" |
Execution Time | The maximum execution time period (In milliseconds) within which the Event program is expected to complete. If the program exceeds this time limit, FireDaemon Pro will forcibly terminate the program regardless of its current state. This time also has a bearing on the overall time the service takes to start or stop. Note: A generous time allowance is recommended. If the Event program completes before the end of the execution time period, FireDaemon Pro will immediately continue with the next Event program in the list (if any). |
Run Detached | If this option is selected, the Event program will simply be executed. The Execution Time is observed, but FireDaemon Pro will not attempt to terminate the Event program once the Execution Time has elapsed. |