Custom tasks are user-defined configuration tasks that you can add in Command Center to perform a defined set of operations on the managed devices. These tasks may contain a heterogeneous set of commands, such as CLI commands, SHELL, or Secure File Transfer Protocol (SFTP), that you can execute on a single device or a set of devices grouped together in a device list.
Use the following procedures for configuring custom tasks:
You can add custom tasks using one of the following methods:
With custom tasks, you have the option to configure task operations in the following ways:
Execute Sequentially: Execute a task on a set of devices, one device at a time. If task execution fails on any device, it does not continue on the remaining devices . By default, if you do not select this option, the task will be executed in parallel.
Enable Automated Rollback (auto rollback): Generates rollback commands at runtime by fetching these commands based on the version of the operating system of the device. The auto rollback feature is supported only on Citrix NetScaler versions 8.1 and later. It is not supported on CloudBridge devices. This feature ensures that task execution behaves as a transaction such that if even one command execution within a task fails, the entire task is rolled back. Auto rollback is an enhancement over the existing manual rollback mechanism where you need to manually type the rollback commands. This feature identifies the NetScaler version (both major and minor) and accordingly determines the appropriate command that must be used to reverse the configuration, if required.
If you configure a task to support the auto rollback feature, the preview screen displays the actual executable commands and the corresponding rollback commands in a tabular format for devices selected in the device list. However, if you configure a task to not support the auto rollback feature, the preview screen displays the actual commands sequentially.
You can create a custom task form start by defining commands and task variables.
add filter policy $policyname$ -rule $expression$ -$actionType$ $actionname$ bind filter global $policyname$
You can add a custom task from a command file that contains the commands to be executed on the devices.
A command file is a text file containing a list of commands that constitute a task; the content could be a snippet of the ns.conf file. Each command may be a NetScaler CLI, Shell, or FTP command. You must have the command file present on the Command Center server or on your local system.
You can add a custom task from an existing task file. You can also enhance or modify an existing task to create a new task. For example, you can create a new task from a built-in task, or import a task already created on another Command Center server. You must have the task file present on the Command Center server or on your local system.
You can execute a custom task on multiple devices at the same time. You can either select devices individually or select a device list for the tasks. You can execute the same task several times on different devices or device lists. You can also preview a task (the commands and rollback commands) before executing it.
After executing a task, you can view the following execution details of that task instantly or at a later time.
You can schedule custom tasks to execute at a later period or recur at regular intervals. For example, you can schedule tasks to be executed at specific hours daily, at specific hours on specific days of the week, and at specific hours on specific days of the month.
You can save the custom tasks in XML format on the Command Center server. This XML file, also known as task file, can be used to create a new custom task in the existing server, or can be copied to another Command Center server.
You can modify the values of the fields in a custom task.
If you do not want to use a custom task again, you can delete it.