ecflow.TimeSeries

class ecflow.TimeSeries

Bases: instance

A TimeSeries can hold a single time slot or a series.

Time series can be created relative to the suite start or start of a repeating node. A Time series can be used as argument to the ecflow.Time, ecflow.Today and ecflow.Cron attributes of a node. If a time the job takes to complete is longer than the interval, a ‘slot’ is missed e.g time 10:00 20:00 01:00, if the 10.00 run takes more than an hour the 11.00 is missed

Constructor:

TimeSeries(single,relative_to_suite_start)
   TimeSlot single :  A single point in a 24 clock
   optional bool relative_to_suite_start : depend on suite begin time or
                                           start of repeating node. Default is false

TimeSeries(hour,minute,relative_to_suite_start)
   int hour   :  hour in 24 clock
   int minute :  minute < 59
   bool relative_to_suite_start<optional> : depend on suite begin time or
                                           start of repeating node. Default is false

TimeSeries(start,finish,increment,relative_to_suite_start)
   start TimeSlot :     The start time
   finish TimeSlot :    The finish time, when used in a series. This must greater than the start.
   increment TimeSlot : The increment. This must be less that difference between start and finish
   bool relative_to_suite_start<optional> : The time is relative suite start, or start of repeating node.
                                            The default is false

Exceptions:

  • Raises IndexError when an invalid time series is specified

Usage:

time_series = TimeSeries(TimeSlot(10,11),False)
TimeSeries.finish((TimeSeries)arg1) TimeSlot :

returns the finish time if time series specified, else returns a NULL time slot

TimeSeries.has_increment((TimeSeries)arg1) bool :

distinguish between a single time slot and a series. returns true for a series

TimeSeries.incr((TimeSeries)arg1) TimeSlot :

returns the increment time if time series specified, else returns a NULL time slot

TimeSeries.relative((TimeSeries)arg1) bool :

returns a boolean where true means that the time series is relative

TimeSeries.start((TimeSeries)arg1) TimeSlot :

returns the start time