Versions Compared

Key

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

...


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.

Code Block
task x

...


task y

...


   trigger ./x == complete or ./x == aborted

...


#
#The above trigger using named operators:
#
# trigger x eq complete or x eq aborted
#
task z
   trigger (x==complete or x==aborted)

...

 and (y==complete or y==aborted)


To run a task on a series of given days, use the Python API:

Code Block
t = ecflow.Task("x")

...


for i in [ 1 , 2, 4, 8, 16 ] :

...


   t.add_date(i,0,0) # 0 means any day,month or year

Will be displayed by the show(CLI) command as:

Code Block
task x

...


   date 1.*.

...

*
   date 2.*.

...

*
   date 4.*.*


To run a task half after the previous task fc has done half of its work:

Code Block
task fc

...


   meter hour 0 240

...


task half

...


   trigger fc:hour >=

...

 120
   # trigger fc:hour ge 120

There is no guarantee that a task will be sent at the exact moment requested. At the specified time, ecFlow might be busy processing other tasks. ecFlow does not check time dependencies constantly, but sweeps through them once a minute. This makes processing of events in ecFlow much more stable.