A trigger for periodic task execution. The period may be applied as either
fixed-rate or fixed-delay, and an initial delay value may also be configured.
The default initial delay is 0, and the default behavior is fixed-delay
(i.e. the interval between successive executions is measured from each
time). To measure the interval between the
time of each execution instead, set the
'fixedRate' property to
Note that the TaskScheduler interface already defines methods for scheduling
tasks at fixed-rate or with fixed-delay. Both also support an optional value
for the initial delay. Those methods should be used directly whenever
possible. The value of this Trigger implementation is that it can be used
within components that rely on the Trigger abstraction. For example, it may
be convenient to allow periodic triggers, cron-based triggers, and even
custom Trigger implementations to be used interchangeably.