...
Text
Let us modify the definition file to add a family f2.
For brevity we have omitted the previous family f1
Code Block |
---|
# Definition of the suite test suite test edit ECF_INCLUDE "$HOME/course" # replace '$HOME' with the path to your home directory edit ECF_HOME "$HOME/course" family f2 edit SLEEP 20 task t1 time 00:30 23:30 00:30 # start(hh:mm) end(hh:mm) increment(hh:mm) task t2 day sunday task t3 date 161.01.2017*.* # Date(day,month,year) - * means every day,month,year time 12:00 task t4 time +00:02. # + means realative to suite begin/requeue time task t5 time 00:02 # 2 minutes past midnight endfamily endsuite |
Python
For brevity we have left out family f1. In python this would be:
Code Block | ||||
---|---|---|---|---|
| ||||
import os
from ecflow import Defs,Suite,Family,Task,Edit,Trigger,Complete,Event,Meter,Time,Day,Date,Edit
def create_family_f2():
return Family("f2",
Edit(SLEEP=20),
Task("t1", Time("00:30 23:30 00:30")), # start(hh:mm) end(hh:mm) increment(hh:mm)
Task("t2", Day("sunday")),
Task("t3", Date("1.*.*"), Time("12:00")), # Date(day,month,year) - * means every day,month,year
Task("t4", Time("+00:02")), # + means realative to suite begin/requeue time
Task("t5", Time("00:02"))) # 2 minutes past midnight
print("Creating suite definition")
home = os.path.join(os.getenv("HOME"), "course")
defs = Defs(
Suite("test",
Edit(ECF_INCLUDE=home,ECF_HOME=home),
#create_family_f1(),
create_family_f2()
))
print(defs)
print("Checking job creation: .ecf -> .job0")
print(defs.check_job_creation())
print("Checking trigger expressions")
errors = defs.check()
assert len(errors) == 0,errors
print("Saving definition to file 'test.def'")
defs.save_as_defs("test.def") |
What to do
- Make the changes to the suite definition file
- Create all the necessary ecf script‘s by copying the one from /test/f1/t7
- Replace the suite
python: python3 test.py; python3 client.py
text: ecflow_client --suspend=/test ; ecflow_client --replace=/test test.def - ecflow_ui has a special window to explain why a task is queued. Select a queued task and press the icon or click on the 'Why tab'
...