from ecflow import Defs,Suite,Task,Day,Date,Cron,Time,TimeSlot,TimeSeries
start task = ecflow.Task("t2") # create a task
task2.add_date( 1,2,2010 ) # day, month, year
task2.add_date( 1,0,0 )TimeSlot(0, 0)
finish = TimeSlot(23, 0)
incr = TimeSlot(0, 30)
time_series = TimeSeries(start, finish, incr, True)
defs = Defs(
Suite("s1",
Task("date",
Date(1, 0, 0), # first of eachevery month orand every year same as: 1..
task2.add_day( "monday" )
task2.add_today( 0,10 ) # hour, minute, same as today 0:10
task2.add_today( ecflow.Today( 0,59, True )) # hour, minute, relative, same as today +0:59
start = ecflow.TimeSlot(0,0) # adding a time series
finish = ecflow.TimeSlot(23,0)
incr = ecflow.TimeSlot(0,30)
ts = ecflow.TimeSeries(
Date("2.*.*"), # second of every month and every yea
Date(28,2,2026)), # 28 February 2026
Task("day",
Day("monday"),
Day(Days.tuesday)),
Task("time",
Time("+00:30"), # 30 minutes after suite has begun
Time("+00:30 20:00 01:00"), # 00:30,01:30,02:30....07:30 after suite start
Time(0, 59, True), # 00:59 - 59 minutes past midnight
Time(TimeSlot(20, 10)), # 20:10 - 10 minutes pas eight
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])))) |