title = final cycle reload test
description = """change final cycle."""

[cylc]
   UTC mode = True
   [[reference test]]
       required run mode = live
       live mode suite timeout = PT1M

[scheduling]
    initial cycle time = 20100101T00
    final cycle time = 20100102T00 # marker
    [[dependencies]]
        [[[R1]]]
            graph = "reloader => a"
        [[[PT6H]]]
        graph = "a[-PT6H] => a"
[runtime]
    [[reloader]]
        script = """
# change the final cycle:
perl -pi -e 's/(final cycle time = )20100102T00( # marker)/\1 20100101T12\2/' $CYLC_SUITE_DEF_PATH/suite.rc
# reload
cylc reload -f $CYLC_SUITE_NAME
sleep 5
"""
    [[a]]
        script = sleep 1
