You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

How can I logically or time dependencies of different types ?

Step-by-step guide

It is important to understand how time dependencies work first.

When we have multiple time dependencies of the same type, they are 'or'ed. i.e.

       time 10.00
       time 12:00             # Task will run when time is 10:00 OR 12:00

Likewise if we have:

       date 1.12.2012
       date 2.12.2012         # Task is free to run only on first or second of December.

When *different* types of time dependencies are added, then the task is only free to run when both are satisfied:

       time 10:00
       date 1.12.2015         # task is only free to run at 10 am on the first of December

This effectively means that mixed time dependencies are logically anded.

Now suppose we wanted to run the task, at 10.00  *OR* when the date is 1.12.2015.

This can be done by adding a dummy task.

       task dummy_time_trigger
          edit ECF_DUMMY_TASK ""   # Tell server & checking not to expect .ecf file
          time 10:00

       task dummy_date_trigger
          edit ECF_DUMMY_TASK ""   # Tell server & checking not to expect .ecf file
          date 1.12.2015

       task time_or_date
          trigger dummy_time_trigger == complete or dummy_date_trigger == complete

      

By using a combination of a dummy task and trigger, we can achieve the effect of 'OR' in time dependencies of different types.

This technique will work for any complex dependency and has the added advantage of allowing us to manually free the dependencies via the GUI.  




  • No labels