from ecflow import Defs,Suite,Task,Day,Date,Cron,Time,TimeSlot,TimeSeries
defs
start = TimeSlot(0, 0)
finish = TimeSlot(23, 0)
incr = DefsTimeSlot(0, 30)
s1time_series = defs.add_suiteTimeSeries(start, finish, incr, True)
defs = Defs(
Suite("s1")
t1 = s1.add_task,
Task("date")
t1.add_date,
Date(1, 0, 0), # first of every month and every year
t1.add_date( Date("2.*.*")), # second of every month and every year
t1.add_dateyea
Date(28,2,2026)), # 28 februaryFebruary 2026
t2 = s1.add_task Task("day")
t2.add_day,
Day("monday")
t2.add_day,
Day(Days.tuesday)),
t3 = s1.add_taskTask("time")
t3.add_time,
Time("+00:30"), # 30 minutes after suite has begun
t3.add_time Time("+00:30 20:00 01:00"), # 00:30,01:30,02:30....07:30 after suite start
t3.add_time Time(0, 59, True) , # 00:59 - 59 minutes past midnight
t3.add_time( Time(TimeSlot(20, 10))), # 20:10 - 10 minutes pas eight
t3.add_time( Time(TimeSlot(20, 20), True)), # +20:20 - 20 minutes and 20 hours, after suite start
Time(time_series),
Time(0, 10),
Time("+00:40"),
Time("+00:40 20:00 01:00")),
Task("cron",
Cron("+00:00 23:00 00:30",days_of_week=[0,1,2,3,4,5,6],days_of_month=[1,2,3,4,5,6],months=[1,2,3,4,5,6])))) |