...
Here are a few examples of combinations with their behaviour.
To run task x only once, on 17th of February 2012 at 10 am:
Code Block |
---|
task x time 10:00 date 17.2.2012 |
To run task x twice, at 10am and 8pm, on both 17th and 19th of February 2012, that is, four times in all. Notice the task is queued in between, and completes only after the last run. Under a hybrid clock, the task is run (twice) only if the date is either 17th or 19th at the time the suite begins:
Code Block |
---|
task x time 10:00 ; time 20:00 date 17.2.2012 ; date 19.2.2012 |
To run task x after task y is complete and if the day is Monday. If the suite is using a real clock, the task waits for the following Monday (unless today is Monday) and for task y to be complete. Under a hybrid clock, if today is not Monday when the suite begins or is auto-restarted, task x is marked complete without being submitted:
Code Block |
---|
task y task x trigger ./y == complete day monday |
The next example shows how to run a task after an earlier task has stopped, either by completing or aborting. It may be useful to continue after a task has tried a few times but still failed. However, this technique should only be used if there is logic somewhere to correct for the missing task. Otherwise, task y will fail as well.
task x
task y
trigger ./x == complete or ./x == aborted
#
...