Create Command

Introduction

Commands are actions that you can schedule to be executed on a remote player. Commands are scheduled to be run either immediately or at a certain time. Recurrent schedule enables you to configure the command such that it executes based on a recurrent pattern. Once executed, the remote player will send back the execution results. From CampaignManager Web, you will be able to see the execution results and confirm whether the command executed properly or not.

Command Creation

Commands can only be created within a project. You must have appropriate permission to create a command. To create a command, click the Commands button from the left navigation menu.

This opens the all Commands list view workspace. The workspace is labeled as Commands, shown in the breadcrumb address. If the list is the empty text “Couldn’t find anything. Want to create a new one?” is shown in the first line of the page.

Click on the link “new”. This will automatically open the modal window Create New Command for creating a new command. This can be also performed by clicking the Create New button on the left navigation menu or from the right context menu.

Enter a name in the Command name field and click Create. This creates a new Command workspace. The workspace has six sections (tabs): What, When, Where, Settings, Execution Results and History. By default after creation and opening What tab is shown.

What Section

Open existing Command. What section is opened by default. Sub-tab Build in Command is selected by default showing the list of all build in Commands. From this list click (select) the appropriate command. For example, in the following image, Turn Off Display Device command is selected. A description of the command is shown in the right details section.

In what section two types of commands can be created:

1Build In CommandsThese are the system provided commands and can be selected from the list of build in commands.
2Command TemplateWith this option user-defined command can be loaded from the existing command library. In the picture below previously created File Retriever command is loaded.

When Section

Click on When section (tab) in the Command’s workspace. Default schedule for the command is to run immediately. In the bottom of this workspace description for the currently selected schedule is shown.

From the Schedule tab page, different types of schedule can be set for the command. For more details on schedules and command schedule please refer to the Schedules article.

Where Section

Click on Where section (tab) in the Command’s workspace. This section has two parts: Available Channels list and Targeted Channels list. If the project has existing channels, then these channels will appear on available channels list.

By default, the target channel list will be empty. Between these two parts, there are few buttons: Add selected channel “>”, add all available channels “»”, Remove selected channel “<” and Remove all selected channels “«”. Using this buttons, one or multiple channels (using SHIFT or Ctrl key from keyboard) or all channels can be moved from available list to target list and vice versa. The channels (that are moved from one list to another) are removed from the source list and added to the destination list. The same channel cannot exist in both lists.

Above both Available Channels list and Targeted Channels list there are search boxes. Type some text string in this boxes to search for a channel. The available channel list will return a filtered result of all channels that match the searched string in their name. The string text will be highlighted in green.

Delete the entered text to retrieve the full list of available channels.

Settings

In this area are shown some settings for the command. This section contains two parts: Command Details, and Post Execution Actions. In Settings tab you can (change) enter a suitable name for the Command. If the command needs to be treated as a trigger, check the Use Trigger checkbox. For more details on Trigger, please refer to the Trigger article.

Command Details

Command Details shows a textbox to change the name of the command, Use trigger checkbox to convert the command to trigger command. Check this checkbox to use the command as trigger command, and in the code field enter some unique code as trigger code for the command.

In the Command details, an edited field is available too, and the value of this field should show when the campaign was last edited.

Post Execution Actions

In this part, three post-execution actions are available: Don’t do anything, create a notification and Send an email to.

By default Don’t do anything radio button is selected. When this radio button is selected after command gets executed, nothing needs to be done. Select “Create Notification” radio button. From the combo box, select proper user or role as the recipient of the email. If the command generates output, checkbox “Only if the command output contains the following string(s)” can be checked and in the white field enter part of the generated output or whole output string. If the command doesn't generate output, leave the field unchecked (empty). If you want to add some text as an output of the command check And includes the output of the command and add some custom message to the white box.

After execution of the command, a new task should be created under “My Tasks” for the selected user or role. Also, an email should be received on the email account with which the selected user has been configured. The email should have the custom message included.

Select “Send an email to” radio button. From the combo box select proper user or role as the recipient of the email. If the command generates output, checkbox “Only if the command output contains the following string(s)” can be checked and in the white field enter part of the generated output or whole output string. If the command doesn’t generate output, leave the field unchecked (empty). If you want to add some text as an output of the command check And includes the output of the command and add some custom message to the white box.

After execution of the command, no new task will be created under “My Tasks” for the selected user or role since notification option not been selected. An email should be received on the email account with which the selected user has been configured. The email should have the custom message included.

Execution Results Section

Execution result sections show execution results for the command. Records for the command execution are shown in the table with results. This table has five columns: Occurred, Machine, Channels, Success and Output.

VersionNumber of published version.
OccurredShows the date and time when command occurs.
MachineShows the name of the machine where command occurs.
ChannelShows channel(s) on which command occurs.
Total Success RateSuccess Rate
Last Time ExecutionDoes the command was successfully executed is shown in this column
OutputIf the command has some output, that output is shown here.

At the bottom of the navigation menu are three buttons: Export to CSV, Clear Execution Results and Refresh Execution Results.

Select Export to CSV button to export the results for command execution to a CSV file. A dialog opens to ask the user to add a name for CSV file and to select where to be saved. Click Save to save CSV file or Cancel to cancel the operation.

Select Clear Execution Result to delete execution results from the table.

History Section

History shows all the changes that have been done to this command. History list view shows the entity name, entity type, verb, description, user, IP address and created on time. Entity name will be the name of the command, entity type will be always Command, verb will depend on what action has been taken (such as create, modify, delete etc.), description will state what change was done to the command, user denotes the user that made those changes, IP address shows the IP address of the machine where the change was carried out while created on shows the date/time of when the history record was created.

There is a search box in the history section next to the user icon menu. Above the History records list are three buttons: Selected user, Selected date and Selected verb, which gives filtered results for the history. By selecting any row in the history table, these buttons become enabled. The first button gives results for the history filtered by the selected user, the second one gives results filtered by selected date and the last button gives results filtered by the selected verb. Selecting any of this buttons will filter and highlight the results with green color. Click again (unselect) the button to retrieve all items in the history list.