[meta]
    title = "automated failure recovery example"
    description = """
        Model task failure triggers diagnosis and recovery tasks, which
        otherwise take themselves out of the suite if model succeeds.
        Model post processing triggers off model or recovery tasks.
    """

[cylc]
    UTC mode = True
    [[reference test]]
        expected task failures = model.20110101T1200Z

[scheduling]
    initial cycle point = 20110101T00
    final cycle point = 20110101T12
    [[graph]]
        T00,T12 = """
           pre:finish => model  # finish trigger
           model:fail => diagnose => recover # fail trigger
           model => !diagnose & !recover  # explicit success trigger
           model:succeed | recover => post  # conditional and explicit success
           post => !model  # removes failed model to allow suite to auto finish
        """

[runtime]
    [[root]]
        script = "true" # fast
    [[model]]
        script = """
            echo Hello from $CYLC_TASK_ID
            if [[ $(cylc util cycletime --print-hour) == 12 ]]; then
                echo "FAILING NOW!"
                false
            else
                echo "Succeeded"
                true
            fi
        """
        [[[meta]]]
            description = A task that succeeds at O UTC and fails at 12 UTC
