5 1 0:Creating a Command Event
Overview
SEP sesam commands enable you to run specific functions on a SEP sesam Client, which can be used to perform or automate different actions in SEP sesam environment. To run a command, you must first define a command and then create and schedule a command event.
A command task contains the command and optional additional parameters. A command can be executed once (with the option Immediate start) or linked with a command event to a schedule for regular or repeated execution. A command task can contain just the basic arguments, and the command event can specify the additional options to specialize the command.
Note | |
In case the command task and the command event specify the same paramaters, the settings in command task take precedence and override the settings in the command event. |
Create a command task
To create a new command, go to Main Selection -> Tasks -> Commands, and click on New Command. The New Command window opens.
Alternatively, you can create a new command task in web UI. Navigate to Backup Strategy -> Command Tasks, and then click on New command task button. The New Command window opens.
Define the settings and options as required. For detailed explanations of the available options, refer to section Command task options.
Click OK to create your command. You can review your commands and assigned events, trigger commands to start immediately, or delete them by right-clicking the selected command.
Command task options
When creating or modifying a command, the following options are available to customize its settings and behavior.
Options
Name | Specify a name for the command. |
User | Enter a username of the user with sufficient access to execute the command on the client. |
Command | Enter the complete command (and parameters, if required), e.g., eventlog.ps1. |
Additional Parameters | Optionally, you can enter additional parameters for the command, which are appended to the end of the command line. Note that additional parameters for a command can also be specified when creating a command event. |
Cancellation Command | Optionally, you can configure a cancellation command. This command will be run if the command event is cancelled during its execution. You can pass special parameters to the cancellation command using the placeholders $PID, $SID and $CMD. They will be replaced with the process ID, the session ID, or the command parameters of the original command. For example, sbc -k -l 2 -P $PID becomes sbc -k -l 2 -P 123456. For more information see cancellation command. |
Note | Add any comments or information related to the command. |
Screenshots
Create a command event
You can create a command event in two ways:
- From Command view (Main Selection -> Tasks -> Commands)
- From Schedules view (Main Selection -> Scheduling -> Schedules)
Note that in the Schedules view you can also change the settings for the schedule. In the Command view you can review the schedule settings, but you cannot modify them.
To create a new command event from the Command view, from Main Selection -> Tasks -> Commands, select the command for which you want to add a command event. Then right-click the selected command and click New Command Event. The New Command Event window opens.
Alternatively, you can also create a command event from the Schedule view. From Main Selection -> Scheduling -> Schedules, right-click the schedule to which you want to add a command event and then click New Command Event. The New Command Event window opens.
Define the settings and options as required. For detailed explanations of the available options, refer to section Command event options.
Note that by default the command event will be added to a schedule. To configure a new schedule, see Creating a Schedule.
To schedule the command event, click Schedule tab. In the Name drop-down list, select the schedule to which you want to assign the command event. If you do not want to add this event to a schedule, select Without Schedule.
Click OK to create your command event. You can review your commands and assigned events, trigger events to start immediately, or delete them by right-clicking the selected event.
Note | |
The SEP sesam Web UI offers an overview of the configured commands and enables you to trigger immediate start.
To review and start commands in web UI, navigate to Backup Strategy -> Command tasks, and click on a command to open the properties window. |
Command event options
When creating or modifying a command event, the following options are available to customize its settings and behavior.
Options
Sequence control | |
---|---|
Priority | Select a priority that will determine the relative importance of this event and establish the execution order of events in a backup day. Event priorities in SEP sesam range from 1 (lowest) to 99 (highest). Events with priority 0 are always executed first, cannot be blocked or used for blocking events. |
Blocking date | Select this option to create a blocking event that prevents the execution of equal events scheduled on the same backup day as the blocking event, but with lower priority. By using this option, events associated with the same task and having lower priority will be blocked from starting. |
Parameters | |
Name | Select the command task this event is based on. When selected, the full command is displayed in the Preview field below. |
User | Enter a username of the user with sufficient access to execute the command on the client. |
Client | Select a client on which the command event will be executed. |
Retention time [days] | Specify the duration (in days) for retaining the command event results and logs. By default, the retention time is set to 30 days. |
Additional Parameters | Optionally, you can enter additional parameters for the command, which are appended to the end of the command. If the command task already includes additional parameters, they are retained in read-only mode, and the event parameters are inserted before the additional parameters of the command task. This ensures that the additional parameters of the command task take precedence. The full command is displayed in the Preview field below. |
Follow-up | Optionally, you can configure a follow-up event that is triggered on the SEP sesam Server after the initial event has successfully completed. For more information, see Follow-up Events. |
Note | Add any comments or information related to the command event. |
Screenshots
See also
Managing Commands - Managing Events - Creating Follow-up Events – Creating a Schedule – About Scheduling