condition timer

Function

The condition timer command configures the specific time when a maintenance assistant is executed.

The undo condition command deletes the trigger condition of a maintenance assistant.

By default, the scheduled task is executed at 04:30 every three days on and after the first day of each month.

Format

condition timer cron minutes hours daysOfMonth months daysOfWeek [ years ]

Parameters

Parameter Description Value
cron

Specifies the format of cron time.

-

minutes

Specifies the minutes in the assistant execution time.

The value is a string of characters in the format of cron time. The value is an integer ranging from 0 to 23.

hours

Specifies the hours in the assistant execution time.

The value is a string of characters in the format of cron time. The value is an integer ranging from 0 to 23.

daysOfMonth

Specifies the date in the assistant execution time.

The value is a string of characters in the format of cron time. The value ranges from 1 to 28, 29, 30, or 31 based on the specific month. The value and days-of-week are mutually exclusive. Either of them must be configured as *.

months

Specifies the month in the assistant execution time.

The value is a string of characters in the format of cron time. The value is an integer ranging from 1 to 12.

daysOfWeek

Specifies the weekday in the assistant execution time.

The value is a string of characters in the format of cron time. The value ranges from 0 to 7. Both 0 and 7 indicate Sunday. The values 1 to 6 indicate Monday to Saturday, respectively. The value and days-of-month are mutually exclusive. Either of them must be configured as *.

years

Specifies the year information.

The value is a string of characters in the format of cron time. The value ranges from 2000 to 2099. This parameter is optional. If this parameter is not specified, all years from 2000 to 2099 are covered.

Views

Maintenance assistant task view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
cli write

Usage Guidelines

Usage Scenario

To configure the time when a maintenance assistant is executed, run the condition timer cron command.

After an alarm is generated, an event occurs, or a timer expires, the maintenance assistant can be executed.

To trigger a maintenance assistant based on a timer, run this command. The time is expressed using the syntax in Unix or Linux cron program.

The commonly used time and date format (hh:mm:ss dd-mm-yyyy) can specify only one specific time value. The time in the cron format is more flexible and can represent a single moment, multiple moments, time range, or interval in a simplified manner. The value can contain 10 numbers (0 to 9) and four special characters (*, -, / and ,).

Example

# Configure a maintenance assistant named task to be executed at 20:00 on May 4, 2012.
<HUAWEI> system-view
[~HUAWEI] ops
[~HUAWEI-ops] assistant _auto_diagnose
[*HUAWEI-ops-_auto_diagnose] condition timer cron 0 20 4 5 * 2012
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >