| 1 |
[scheduling] |
| 2 |
cycling mode = integer |
| 3 |
initial cycle point = 1 |
| 4 |
runahead limit = P5 # max number of cycles which can run in parallel |
| 5 |
[[special tasks]] |
| 6 |
# register the external trigger, it must be given a name, |
| 7 |
# here, 'trigger' is used as a placeholder, the bash script will |
| 8 |
# need to be updated if this is changed |
| 9 |
external-trigger = configure("trigger") |
| 10 |
[[graph]] |
| 11 |
P1 = """ |
| 12 |
# use a "?" to prevent failures causing runahead stalls |
| 13 |
configure? => run |
| 14 |
""" |
| 15 |
|
| 16 |
[runtime] |
| 17 |
[[configure]] |
| 18 |
# this task reads in the broadcast file the trigger wrote |
| 19 |
# and broadcasts any variables set to all tasks in this cycle |
| 20 |
script = """ |
| 21 |
echo "received new ext-trigger ID=$CYLC_EXT_TRIGGER_ID" |
| 22 |
TRIGGER_FILE="${CYLC_WORKFLOW_RUN_DIR}/triggers/${CYLC_EXT_TRIGGER_ID}.cylc" |
| 23 |
cylc broadcast "${CYLC_WORKFLOW_ID}" \ |
| 24 |
-p "${CYLC_TASK_CYCLE_POINT}" \ |
| 25 |
-F "${TRIGGER_FILE}" |
| 26 |
""" |
| 27 |
|
| 28 |
[[run]] |
| 29 |
# this task could be a sub-workflow |
| 30 |
script = """ |
| 31 |
echo "Hello $WORLD!" |
| 32 |
""" |