Horizontal Navigation Bar | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
and that can be updated using the child command ecflow_client –label
Ecf Script
We will create new family f3 with a task t1.
Create ecf script $HOME/course/test/f3/t1.ecf
Code Block | ||
---|---|---|
| ||
%include <head.h> n=1 while [[ $n -le 5 ]] # Loop 5 times do msg="The date is now $(date)" ecflow_client --label=info "$msg" # Set the label sleep 60 # Wait a one minute (( n = $n + 1 )) done ecflow_client --label info "I have now finished my work." %include <tail.h> |
...
Python
The following section shows how to add a ecflow.Label in python:
#!/usr/bin/env python2.7
import os
import ecflow
print "Creating suite definition"
defs = ecflow.Defs()
suite = defs.add_suite("test")
suite.add_variable("ECF_INCLUDE", os.getenv("HOME") + "/course")
suite.add_variable("ECF_HOME", os.getenv("HOME") + "/course")
suite.add_family("f3").add_task("t1").add_label("info","")
print defs
print "Checking job creation: .ecf -> .job0"
print defs.check_job_creation()
print "Saving definition to file 'test.def'"
defs.save_as_defs("test.def")
What to do
- Modify the suite definition file or python script
- Create the new ecf script file $HOME/course/test/f3/t1.ecf
- Replace the suite definition
- Watch in ecflowview
...
Horizontal Navigation Bar | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|