Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

 

time

time dependencies can be absolute, i.e. they will run at the exact time.
They can also be relative; in this case we provide the time from the moment the suite is begun.
Time dependencies can be repeated at regular intervals.  The nodes stays complete once all time instances have run.

 

Code Block
time 23:00                  # at next 23:00
time 10:00 20:00 01:00      # every hour from 10am to 8pm
time +00:01                 # one minute after the suite has begun
time +00:10 01:00 00:05     # 10 to 60 minutes after begin every 5 minutes

 

In the last example we have task that runs every five minutes, however what happens if the task takes longer ? 

When this happens, the time slot, is missed.


date or day

cron

Date Date dependencies are always absolute, but wild cards can be used

Cron dependencies can be specified using the

date or the day keyword.

cron keyword.  Cron differs from time as when the node is complete it queues again immediately.  Cron also only works with a real time clock (not a hybrid clock).

Code Block
date 31.12.2012
cron 23:00             
#
 
the
 
31st
 
of
 
December
 
2012 date 01.*.*
# every day at 23:00
cron 08:00 12:00 01:00      
# every hour 
first
between 
of
8 
the
and 
month
12
date *.10.*
cron -w 0,2   
11:00         
# every 
day
sunday 
in
and 
October date 1.*.2008
tuesday at 11 am
cron -d 1,15   02:00        # every 1st 
first
and 15th of 
the
each month
,
 
but
at 
only
2 
in 2008
am
day
cron 
monday
-m 1 -d 1  14:00       # every first of January at 
#
2 
every monday
pm
 
Info
cron
titleTime,Today,Cron

When a time has expired, the associated node is free to run. The time will stay expired, until the node has been re-queued.

date or day

Date dependencies can be specified using the
cron keyword.  Cron differs from time as when the node is complete it queues again immediately.  Cron also only works with a real time clock (not a hybrid clock).
date or the day keyword.
Date dependencies are always absolute, but wild cards can be used.
Code Block
date 31.12.2012 
Code Block
cron 23:00            # the 31st of December  # every day at 23:00
cron 08:00 12:00 01:002012
date 01.*.*                 # every hour between 8 and 12
cron -w 0,2   11:00 first of the month
date *.10.*                 # every sundayday andin tuesday at 11 am
cron -d 1,15October
date 1.*.2008       02:00        # every 1st andfirst 15th of eachthe month, but atonly 2in am2008
cronday monday -m 1 -d 1  14:00       # every first of January at# 2every pmmonday

Mixing time dependencies on the same node

A task can have several time and date dependencies.   For example:

Code Block
task tt
   day monday
   time 10:00   # run on Monday at 10:00.  Here Day/date acts like a guard over the time.
Code Block
task tt
   day sunday
   day wednesday
   date 01.*.*                 # The first of every month and year
   date 10.*.*                 # The tenth of every month and year
   time 01:00
   time 16:00
 
The task will run on Sunday’s and Wednesday’s at 1am and 4pm, but only if the day is the 1st or the 10th of the month.
It can be seen that when we have multiple time dependencies on the same node, then time dependencies of the same type are or'ed together, and then and'ed with the different types.

Mixing time dependencies on different nodes

When time dependencies are placed on different nodes in the hierarchy, the results may seem surprising.

Code Block
family fam
   day monday
   task tt
      time 10:00    # This will run on Monday at midnight, and Monday at 10 am ?

family fam2
   time 10:00
   task tt
       day monday # This will run on Monday at midnight, and Monday at 10 am ?

The example above assume we have suite, with an infinite repeat loop. So why does the task run on Monday at midnight?

This is because time dependencies on different nodes act independently of each other.  In this case time attribute was set free, on Sunday at 10 am.  Hence at for task tt its free to run at Monday at midnight. After task has run and re-queued. It will then run on Monday at 10 am.

Like trigger‘s, date and time dependencies can be set for a family. In this case, the tasks of this family will only run according to these dependencies.

 

Note

All time related dependencies(like cron, time, today, date and day) are relative to the clock of the suite.

For more information, see Dates and Clocks

 

...