[cylc]
   cycle point format = %Y%m%dT%H
   [[reference test]]
       required run mode = live
       live mode suite timeout = PT2M
[scheduling]
    initial cycle point = 20100101T00
    final cycle point   = 20100101T18
    runahead limit = PT18H
    [[special tasks]]
        sequential = "foo"
    [[dependencies]]
        [[[R1]]]
            graph = monitor:start => foo
        [[[PT6H]]]
            graph = foo
[runtime]
    [[foo]]
        script = sleep 10
    [[monitor]]
        script = """
        while true; do
            sleep 1
            RUNNING=$(sqlite3 "$CYLC_SUITE_RUN_DIR/log/db" "select count(*) from task_states where name is 'foo' and status is 'running'") || RUNNING=0
            if ((RUNNING>1)); then
                false
            fi
            sleep 1
            FINISHED=$(sqlite3 "$CYLC_SUITE_RUN_DIR/log/db" "select count(*) from task_states where name is 'foo' and status is 'succeeded'") || FINISHED=0
            if ((FINISHED==4)); then
                break
            fi
        done
"""
