Scheduling a task

Editing task schedule settings

To set a task schedule:

  1. Save task schedule settings to a configuration file by executing the following command:

    kesl-control --get-schedule <task ID>|<task name>

  2. Open the configuration file for editing.
  3. Specify the schedule settings.
  4. Save the changes in the configuration file.
  5. Import the schedule settings from the configuration file to the task using the following command:

    kesl-control --set-schedule <task ID>|<task name> --file <full path to file>

The application will apply the new values of the schedule settings immediately.

Task schedule settings

The application provides the following settings for configuring the task launch schedule:

RuleType=Once|Monthly|Weekly|Daily|Hourly|Minutely|Manual|PS|BR

where:

PS – start the task after starting the application.

BR – start the task after the application databases have been updated.

StartTime=[year/month/month_day] [hh]:[mm]:[ss]; [<month_day>|<week_day>]; [<period>] – task start time.

RandomInterval=<min.> – task run interval, if several tasks are running at the same time (in minutes).

RunMissedStartRules – enables launch of the missed task after the application starts.

Examples:

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

RuleType=Hourly

RunMissedStartRules=No

StartTime=2020/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

The kesl-control --get-schedule command

The kesl-control --get-schedule command displays the task schedule settings or saves them to the specified configuration file.

Command syntax

kesl-control [-T] --get-schedule <task ID>|<task name> [--file <configuration file name>]

kesl-control [-T] --get-schedule <task ID>|<task name> <parameter name>

Arguments and keys

<task ID> is the task identification number in the application.

<task name> is the name of the task.

--file <configuration file name> is the name of the configuration file where the schedule settings will be saved. If you specify the name of a file without specifying its path, the file will be created in the current directory. If a file with the specified name already exists in the specified path, it will be overwritten. If the specified directory cannot be found on the disk, the configuration file will not be created.

Example:

Save the update task settings to a file named update_schedule.ini and save the created file in the current directory:

kesl-control --get-schedule 6 --file update_schedule.ini

Display the Update task schedule:

kesl-control --get-schedule 6

The kesl-control --set-schedule command

The kesl-control --set-schedule command sets the task schedule settings using the command keys or imports the task schedule settings from the specified configuration file.

Command syntax

kesl-control --set-schedule <task ID>|<task name> --file <configuration file name>

kesl-control --set-schedule <task ID>|<task name> <parameter name>=<parameter value> <parameter name>=<parameter value>

Arguments and keys

<task ID> is the task identification number in the application.

<task name> is the name of the task.

--file <configuration file name> is the name of the configuration file; the schedule settings from this file will be imported into the task; includes the full path to the file.

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

Page top