Scheduling a task
July 25, 2024
ID 236381
You can view and configure the schedule settings for the following task types: ODS, Update, Rollback, ODFIM, ContainerScan and InventoryScan.
Editing task schedule settings
To configure task schedule settings:
- Save task schedule settings to a configuration file by executing the following command:
kics-control --get-schedule <task
ID>|<task
>|<
task name
> --file <
configuration file name
> [--json]
- Open the configuration file for editing.
- Specify the schedule settings.
- Save the changes in the configuration file.
- Import the schedule settings from the configuration file to the task using the following command:
kics-control --set-schedule <task
ID>|<task
>|<
task name
> --file <
configuration file name
> [--json]
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:
Manual – start the task manually.
PS – start the task after starting the application.
BR – start the task after the application databases have been updated.
StartTime=[<
year
>/<
month
>/<
day of the month
>] [
hh
]:[
mm
]:[
ss
]; [<
day of the month
>|<
day of the week
>]; [<
start periodicity
>]
– task start time. The StartTime
setting is required if RuleType=Once|Monthly|Weekly|Daily|Hourly|Minutely
.
RandomInterval=<
minutes
>
– a time interval from 0 to the specified value (in minutes), which will be added to the task start time to avoid starting tasks at the same time.
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:
To schedule the task to start every ten minutes, specify the following settings:
To schedule the task to start on the 15th of every month, specify the following settings:
To schedule the task to start on every Tuesday, specify the following settings:
To schedule the task to start every 11 days, specify the following settings:
|
kics-control --get-schedule
The kics-control --get-schedule command
displays the parameters of the task schedule or saves them to the specified configuration file.
Command syntax
kics-control [-T] --get-schedule <task
ID>|<task
>|<
task name
> [--file <
configuration file name
>] [--json]
Arguments and keys
<task
ID
>
is the task identification number in the application.
<
task name
>
is a name of a 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.
Examples: Save the update task settings to a file named update_schedule.ini and save the created file in the current directory:
Display the Update task schedule:
|
kics-control --set-schedule
The kics-control --set-schedule command
sets the task schedule parameters using command keys or imports the task schedule parameters from the specified configuration file.
Command syntax
kics-control --set-schedule <task
ID>|<task
>|<
task name
> --file <
configuration file name
> [--json]
kics-control --set-schedule <task
ID>|<task
>|<
task name
> <
setting name
>=<
setting value
> <
setting name
>=<
setting value
>
Arguments and keys
<task
ID
>
is the task identification number in the application.
<
task name
>
is a name of a 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:
|