ecflow_suite: ecflow_suite definition

Description Usage Arguments Details Examples

Description

Functions for building ecFlow suites

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## 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)

waternumbers/ecFlowR documentation built on Nov. 5, 2019, 12:07 p.m.