Time Unit Entities
Feature | Since Version | Notes |
---|---|---|
Basic Units (SECONDS , MINUTES , HOURS , DAYS ) |
>v1.4.1 | Basic time units for ON EVERY |
Extended Units (WEEKS , MONTHS , YEARS ) |
>v1.4.1 | Extended time units for ON EVERY |
These entities represent units of time and are used exclusively with the ON EVERY
functional keyword to define time-based triggers for ACTION
definitions.
Usage
Used to specify the frequency of a time-based trigger.
Syntax
<number>
: A positive integer specifying the interval count.<timeUnit>
: One of the time unit entities listed below.
Available Time Units (All since >v1.4.1)
SECOND
/SECONDS
MINUTE
/MINUTES
HOUR
/HOURS
DAY
/DAYS
WEEK
/WEEKS
MONTH
/MONTHS
YEAR
/YEARS
Note: Both singular and plural forms are accepted (e.g., 1 SECOND
is equivalent to 1 SECONDS
).
Examples
1. Trigger every 30 seconds:
2. Trigger every 5 minutes:
3. Trigger once a day:
4. Trigger every week:
DEFINE ACTION WeeklyMaintenance
ON EVERY 1 WEEK DO
PUBLISH TOPIC "maintenance/schedule" WITH "start"
Related Documentation
- Entities Index
- Functional Keywords (See
ON
keyword)