#!Jinja2

[scheduler]
    UTC mode = True
    [[events]]
        expected task failures = 19990101T0000Z/bad-submitter

[scheduling]
    initial cycle point=1999
    final cycle point=1999
    [[graph]]
        P1Y = bad-submitter:submit-failed? => grepper

[runtime]
    [[root]]
    [[bad-submitter]]
        script = true
        platform = {{ CYLC_TEST_PLATFORM }}
    [[grepper]]
        script = """
            set -x
            # Test that the original command is printed
            A_LOG="$(dirname "$0")/../../bad-submitter/01/job-activity.log"
            grep '\[jobs-submit cmd\] ssh .* {{CYLC_TEST_HOST}} .*cylc jobs-submit.*' \
                "${A_LOG}"
            # Stop the workflow cleanly
            cylc stop "${CYLC_WORKFLOW_ID}"
        """
