| 1 |
[scheduler] |
| 2 |
cycle point format = %Y%m%dT%H |
| 3 |
[scheduling] |
| 4 |
initial cycle point = 20100101T00 |
| 5 |
final cycle point = 20100101T18 |
| 6 |
runahead limit = PT18H |
| 7 |
[[special tasks]] |
| 8 |
sequential = "foo" |
| 9 |
[[graph]] |
| 10 |
R1 = monitor:start => foo |
| 11 |
PT6H = foo |
| 12 |
[runtime] |
| 13 |
[[foo]] |
| 14 |
script = true |
| 15 |
[[monitor]] |
| 16 |
script = """ |
| 17 |
while true; do |
| 18 |
sleep 1 |
| 19 |
RUNNING=$(sqlite3 "$CYLC_WORKFLOW_RUN_DIR/log/db" "select count(*) from task_states where name is 'foo' and status is 'running'") || RUNNING=0 |
| 20 |
if ((RUNNING>1)); then |
| 21 |
false |
| 22 |
fi |
| 23 |
sleep 1 |
| 24 |
FINISHED=$(sqlite3 "$CYLC_WORKFLOW_RUN_DIR/log/db" "select count(*) from task_states where name is 'foo' and status is 'succeeded'") || FINISHED=0 |
| 25 |
if ((FINISHED==4)); then |
| 26 |
break |
| 27 |
fi |
| 28 |
done |
| 29 |
""" |