A standard Vixie Cron expression is used to represent the
periodicity in which the task should run. When the task is
triggered, the configured action is invoked on the configured
action node instance. The action is run as the user that
configured the task. To schedule a task to run sync-from on 2 AM
on the 1st every month we do:
Note
If the task was added through an XML init file the task
will run with the system
user,
which implies that AAA rules will not be
applied at all. Thus the task action
will not be able to initiate device communication.
If the action node instance is given as an XPath 1.0 expression,
the expression is evaluated with the root as the context node,
and the expression must return a node set. The action is then
invoked on each node in this node set.
Optionally action parameters can be configured in XML format
to be passed to the action during invocation.
Once the task has been configured you could view the next run
times of the task:
You could also see if the task is running or not:
A standard Vixie Cron expression is a string comprising five
fields separated by white space that represents a set of
times. The following rules can be used to create an expression.
Table 7. Expression rules
Field |
Allowed values |
Allowed special characters |
Minutes |
0-59 |
* , - / |
Hours |
0-23 |
* , - / |
Day of month |
1-31 |
* , - / |
Month |
1-12 or JAN-DEC |
* , - / |
Day of week |
0-6 or SUN-SAT |
* , - / |
The following list describes the legal special characters and
how you can use them in a Cron expression.
-
Star ( * ). Selects all values within
a field. For example, *
in the minute field
selects every minute.
-
Comma ( , ). Commas are used to
specify additional values. For example, using MON,WED,FRI
in the day of week field.
-
Hyphen ( - ). Hyphens define
ranges. For example 1-5
in the day of week
field indicates every day between Monday and Friday, inclusive.
-
Forward slash ( / ). Slashes can be combined
with ranges to specify increments. For example, */5
in
the minutes field indicates every 5 minutes.