[scheduler]
   [[events]]
       expected task failures = 1/t1

[scheduling]
    [[graph]]
        R1 = """t1:start => t2"""

[runtime]
    [[t1]]
        script = """
            cylc__job__wait_cylc_message_started
            set +e
            trap '' SIGKILL
            kill -s SIGKILL $$
            sleep 5 # Prevent the script to run to success before it is killed
        """
        [[[events]]]
            failed handlers = echo
    [[t2]]
        script = """
            cylc kill "${CYLC_WORKFLOW_ID}//*/t1"
            sleep 1
            cylc poll "${CYLC_WORKFLOW_ID}//*/t1"
            sleep 1
            cylc shutdown "${CYLC_WORKFLOW_ID}"
        """
        [[[job]]]
            execution time limit = PT1M
