    [[OUTPUT]]
        script = """
            sleep 5
            # Handle db locks.
            for i in {0..10}; do
                ctb-select-task-states \
                    "${CYLC_SUITE_RUN_DIR}" "${CYLC_TASK_NAME}" \
                    > {{ TEST_DIR }}/$OUTPUT_SUFFIX-db && break
                sleep 1
            done
        """
    [[shutdown]]
        inherit = OUTPUT
        post-script = """
            cylc shutdown $CYLC_SUITE_NAME
            sleep 5
        """
        [[[meta]]]
            description = "Force a shutdown of the suite"
        [[[environment]]]
            OUTPUT_SUFFIX=pre-restart
    [[output_states]]
        inherit = OUTPUT
        pre-script = """
            sleep 5
        """
        [[[meta]]]
            description = "Wait for the restart to complete, then output states"
        [[[environment]]]
            OUTPUT_SUFFIX=post-restart
    [[finish]]
        script = true
