[scheduler]
   allow implicit tasks = True
   [[events]]
      inactivity timeout = PT1M
      abort on inactivity timeout = True
[scheduling]
   [[graph]]
      R1 = """
         a => b => c? => d
         c:fail? => kick-c
      """
[runtime]
   # First run: c stops the scheduler then fails.
   # On restart, kick-c retriggers c to run 'cylc show'.
   [[kick-c]]
      script = cylc trigger "$CYLC_WORKFLOW_ID//1/c"
   [[c]]
      script = """
         if ((CYLC_TASK_SUBMIT_NUMBER == 1)); then
            cylc stop --now --max-polls=10 --interval=1 $CYLC_WORKFLOW_ID
            false
         else
            # Allow time for c submission => running
            sleep 2
            cylc show "$CYLC_WORKFLOW_ID//1/b" >> $CYLC_WORKFLOW_RUN_DIR/show-b.txt
            cylc show "$CYLC_WORKFLOW_ID//1/c" >> $CYLC_WORKFLOW_RUN_DIR/show-c.txt
            cylc show "$CYLC_WORKFLOW_ID//1/d" >> $CYLC_WORKFLOW_RUN_DIR/show-d.txt
         fi
      """
