Configuring task schedule in the command line

If the application is being used in standard mode, you can configure the run schedule for the following types of tasks: ODS, Update, Rollback, ODFIM, ContainerScan, and InventoryScan.

If the application is used in Light Agent mode to protect virtual environments, you can configure the run schedule for the following types of tasks: ODS, ODFIM, ContainerScan, and InventoryScan.

You can output the current values of the settings for the task run schedule to the console or to a configuration file.

To output the current settings for the task run schedule to the console, execute the following command:

kesl-control --get-schedule <task ID/name> [--json]

where:

To output the current settings for the task run schedule to a configuration file, execute the following command:

kesl-control --get-schedule <task ID/name> --file <path to configuration file> [--json]

where:

You can edit the settings for the task run schedule in the following ways:

To edit the values of the settings for task run schedule using a configuration file, perform the following actions:

  1. Output the task settings to the configuration file using the command kesl-control --get-schedule.
  2. Edit the values of the necessary settings in the file and save the changes.
  3. Execute the command:

    kesl-control --set-schedule <task ID/name> --file <path to configuration file> [--json]

    where:

    <task ID/name> is the ID assigned to the task at the time of its creation, or the name of the task in the command line.

    --file <configuration file path> – full path to the configuration file from which the task schedule settings will be imported.

    --json: specify this key if you are importing settings from a configuration file in JSON format. If the --json key is not specified, the application attempts to import from an INI file. If the import fails, an error is displayed.

All values of the settings for the task run schedule defined in the file will be imported into the application.

Example:

Import the schedule settings from the configuration file named /home/test/on_demand_schedule.ini into the task with ID=2:

kesl-control --set-schedule 2 --file /home/test/on_demand_schedule.ini

To edit the individual values of the settings for the task run schedule using the command line, execute the following command:

kesl-control --set-schedule <task ID/name> <setting name>=<setting value> [<setting name>=<setting value>]

where:

The values of the specified settings for the task run schedule are modified.

Examples:

To schedule the task to start every ten hours, specify the following settings:

RuleType=Hourly

RunMissedStartRules=No

StartTime=2021/May/30 23:05:00;10

RandomInterval=0

To schedule the task to start every ten minutes, specify the following settings:

RuleType=Minutely

RunMissedStartRules=No

StartTime=23:10:00;10

RandomInterval=0

To schedule the task to start on the 15th of every month, specify the following settings:

RuleType=Monthly

RunMissedStartRules=No

StartTime=23:25:00;15

RandomInterval=0

To schedule the task to start on every Tuesday, specify the following settings:

RuleType=Weekly

StartTime=18:01:30;Tue

RandomInterval=99

RunMissedStartRules=No

To schedule the task to start every 11 days, specify the following settings:

RuleType=Daily

RunMissedStartRules=No

StartTime=23:15:00;11

RandomInterval=0

Page top