Functions for building ecFlow suites

suite(name, ...)

family(name, ...)

task(name, ...)

edit(par, val)

cron(start, end, step)

label(name, val = "''")

trigger(cond = "''")

Arguments

name

name of the suite, task, family or label

...

nested suite objects

par

parameter to set

val

desired value for name to take

start

start of cron period

end

end of cron period

step

step of cron

cond

the condition for the trigger to occur

Details

cron times should be provided as strings. Parameter values are escaped if they are character strings.

Examples

## defining a simple suite tmp <- suite("ecFlowR_test", edit("ECF_MICRO","%"), edit("ECF_JOB_CMD","Rscript %ECF_JOB% > %ECF_JOBOUT% 2>&1"), edit("ECF_KILL_CMD","kill -15 %ECF_RID%"), edit("ECF_CHECK_CMD","ps --pid %ECF_RID% -f"), edit("ECF_NODE","%ECF_HOST%"), edit("ECF_STATUS_CMD","ps --pid %ECF_RID% -f > %ECF_JOB%.stat 2>&1"), edit("etste",2), task("shouldRun", cron("00:00","23:59","00:01"), label("lastRun"), label("lastSucess")), task("shouldFail", cron("00:00","23:59","00:01"), label("lastRun"), label("lastSucess")), task("catchFail", cron("00:00","23:59","00:01"), label("lastRun"), label("lastSucess")) ) writeLines(tmp)
#> suite ecFlowR_test #> edit ECF_MICRO '%' #> edit ECF_JOB_CMD 'Rscript %ECF_JOB% > %ECF_JOBOUT% 2>&1' #> edit ECF_KILL_CMD 'kill -15 %ECF_RID%' #> edit ECF_CHECK_CMD 'ps --pid %ECF_RID% -f' #> edit ECF_NODE '%ECF_HOST%' #> edit ECF_STATUS_CMD 'ps --pid %ECF_RID% -f > %ECF_JOB%.stat 2>&1' #> edit etste 2 #> task shouldRun #> cron 00:00 23:59 00:01 #> label lastRun '' #> label lastSucess '' #> task shouldFail #> cron 00:00 23:59 00:01 #> label lastRun '' #> label lastSucess '' #> task catchFail #> cron 00:00 23:59 00:01 #> label lastRun '' #> label lastSucess '' #> endsuite