Navigating to System > Task Scheduler you can schedule appliance tasks to run automatically. You can create or manage tasks from the ESA Web UI.
This is the multi-page printable view of this section. Click here to print.
Scheduling appliance tasks
- 1: Viewing the scheduler page
- 2: Creating a scheduled task
- 3: Scheduling Configuration Export to Cluster Tasks
- 4: Deleting a scheduled task
1 - Viewing the scheduler page
The following figure illustrates the default scheduled tasks that are available after you install the appliance.
The Scheduler page displays the list of available tasks.
To edit a task, click Edit. Click Save and then click Apply and enter the root password after performing the required changes.
To delete a task, select the required task and click Remove. Then, click Apply and enter the root password to remove the task.
On the ESA Web UI, navigate to Audit Store > Dashboard > Discover screen to view the logs of a scheduled task.
For creating a scheduled task, the following parameters are required.
- Basic properties
- Customizing frequency
- Execution
- Restrictions
- Logging
The following tasks must be enabled on any one ESA in the Audit Store cluster. Enabling the tasks on multiple nodes will result in a loss of data. If these scheduler task jobs are enabled on an ESA that was removed, then enable these tasks on another ESA in the Audit Store cluster.
- Update Policy Status Dashboard
- Update Protector Status Dashboard
Basic properties
In the Basic Properties section, you must specify the basic and mandatory attributes of the new task. The following table lists the basic attributes that you need to specify.
Attribute | Description |
---|---|
Name | A unique numeric identifier must be assigned. |
Description | The task displayed name, which should also be unique. |
Frequency | You can specify the frequency of the task: |
Customizing frequency
In the Frequency section of the new scheduled task, you can customize the frequency of the task execution. The following table lists the frequency parameters which you can additionally define.
Attribute | Description | Notes |
---|---|---|
Minutes | Defines the minutes when the task will be executed: | Every minute is the default. You can select several options, or clear the selection. For example, you can select to execute the task on the first, second, and 9th minute of the hour. |
Days | Defines the day of the month when the task will be executed | Every day is the default. You can select several options, or clear the selection. |
Days of the week | Defines the day of the week when the task will be executed: | Every DOW (day of week) is the default. You can select several options, or clear the selection. |
Hours | Defines the hour when the task will be executed | Every hour is the default. You can select several options, or clear the selection. If you select *, then the task will be executed each hour.If you select */6, then the task will be executed every six hours at 0, 6, 12, and 18. |
Month | Defines the month when the task will be executed | Every month is the default. You can select several options, or clear the selection. If you select *, then the task will be executed each month. |
The Description field of Frequency section will be automatically populated with the frequency details that you specified in the fields mentioned in the following table. Task Next Run will hint when the task next run will occur.
Execution
In the Command Line section, you need to specify the command which will be executed, and the user who will execute this command. You can optionally specify the command parameters separately.
Command LineIn the Command Line edit field, specify a command that will be executed. Each command can include the following items:
- The task script/executable command.
- User name to execute the task is optional.
- Parameters to the script as part of the command is optional, can be specified separately in the Parameters section.
ParametersUsing the Parameters section, you can specify the command parameters separately.
You can add as many parameters as you need using the Add Param button, and remove the unnecessary ones by clicking the Remove button.
For each new parameter you need to enter Name (any), Type (option), and Text (any).
Each parameter can be of text (default) and system type. If you specify system, then the parameter will be actually a script that will be executed, and its output will be given as the parameter.
UsernameIn the Username edit field, specify the user who owns the task. If not specified, then tasks run as root.
Only root, local_admin, and ptycluster users are applicable.
Restrictions
In a Trusted Appliance cluster, Restrictions allow you to choose the sites on which the scheduled tasks will be executed. The following table lists the restrictions that you can select.
Attribute | Description |
---|---|
On master site | The scheduled tasks are executed on the Master site |
On non-master site | The scheduled tasks are executed on the non-Master site |
If you select both the options, On master site and On non-master site, then the scheduled task is executed on both sites.
Logging
In the Logging section, you should specify the logging details explained in the table below:
Logging Detail | Description | Notes |
---|---|---|
Show command line in logs? | Select a check-box to show the command line in the logs. | It is advisable not to select this option if the command includes sensitive data, such as passwords. |
SysLogLog Server | Define the following details: | You should configure these fields to be able to easily analyze the incoming logs. Specifies whether to send an event to the Log Server (ESA) and the severity: No event, Lowest, Low, Medium, High, Critical for failed/success task execution. |
Log File | Specify the files names where the success and failed operations are logged. | Specifies whether to store the task execution details in local log files. You can specify to use the same file for successful and failed events. These files will be located in /var/log . You can also examine the success and failed logs in the Appliance Logs, in the appliance Web Interface. |
2 - Creating a scheduled task
Perform the following steps to create a scheduled task.
- On the ESA Web UI, navigate to System > Task Scheduler.
- Click New Task. The New Task screen appears.
- Enter the required information in the Basic Properties section.For more information about the basic properties, refer here.
- Enter the required information in the Frequencies section.For more information about customizing frequencies, refer here.
- Enter the required information in the Command Line section.For more information about executing command line, refer here.
- Enter the required information in the Restrictions section.For more information about restrictions, refer here.
- Enter the required information in the Logging section.For more information about logging, refer here.
- Click Save.A new scheduled task is created.
- Click Apply to apply the modifications to the task.A dialog box to enter the root user password appears.
- Enter the root password and click OK.The scheduled task is now operational.
Running the task
After completing the steps, select the required task and click Run Now to run the scheduled task immediately.
Additionally, you can create a scheduled task, for exporting a configuration to a trusted appliances cluster using System > Backup/Restore > Export.
3 - Scheduling Configuration Export to Cluster Tasks
You can schedule configuration export tasks to periodically replicate a specified configuration on the necessary cluster nodes.
The procedure of creating a configuration export task is almost the same as exporting a configuration to the cluster. The is a slight difference between these processes. In exporting a configuration to the cluster, it is a one-time procedure which the user needs to run manually. A scheduled task makes periodic updates and can be run a number of times in accordance with the schedule that the user specifies.
To schedule a configuration export to a trusted appliances cluster:
From the ESA Web UI, navigate to System > Backup & Restore > Export.
Under Export, select the Cluster Export radio button.
If the configurations must be exported on a different ESA, then clear the Certificates check box during the export. For information about copying Insight certificates across systems, refer to Rotating Insight certificates.
Click Start Wizard.
The Wizard - Export Cluster screen appears.
In the Data to import, customize the items that you need to export from this machine and imported to the cluster nodes.
Click Next.
In the Source Cluster Nodes, select the nodes that will run this task.
You can specify them by label or select individual nodes.
Click Next.
In the Target Cluster Nodes, select the nodes to import the data.
Click Review.
The New Task screen appears.
Enter the required information in the following sections.
- Basic Properties
- Frequencies
- Command Line
- Restriction
- Logging
Click Save.
A new scheduled task is created.Click Apply to apply the modifications to the task.
A dialog box to enter the root user password appears.Enter the root password and click OK.
The scheduled task is operational.Click Run Now to run the scheduled task immediately.
4 - Deleting a scheduled task
Perform the following steps to delete a scheduled task:
- From the ESA Web UI, navigate to System > Task Scheduler.The Task Scheduler page displays the list of available tasks.
- Select the required task.
- Click Remove.A confirmation message to remove the scheduled task appears.
- Click OK.
- Click Apply to save the changes.
- Enter the root password and select Ok.The task is deleted successfully.