# Extending and restarting a a workflow

**URL:** <https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911>\
**Category:** Cylc Support\
**Created:** [March 3, 2024, 11:04pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911 "2024-03-03T23:04:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 3, 2024, 11:04pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/1 "2024-03-03T23:04:17Z")

</div>

hi there,

i have a workflow which has run for 1 month (1 resubmission period) and i want to extend it to 2 months.

i’ve run `cylc vr` after changing the run length variable but the `cylc log` output says i need manually trigger the task to get it to run?

```auto
 2024-03-03T22:56:20Z WARNING - PT2M restart timer starts NOW
2024-03-03T22:56:20Z WARNING - This workflow already ran to completion.
 To make it continue, trigger new tasks before the restart timeout.
2024-03-03T22:58:21Z WARNING - restart timer timed out after PT2M
2024-03-03T22:58:21Z INFO - Workflow shutting down - AUTOMATIC
2024-03-03T22:58:22Z INFO - [('workflow-event-handler', 'shutdown') cmd]

```

is this right/expected? in `cylc 7` it would’ve worked out that it needed to continue on its own.

cheers,

jonny

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 3, 2024, 11:07pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/2 "2024-03-03T23:07:45Z")

</div>

also even when manually triggering the task, it shows up in `cylc tui` but not in the web UI (apart from the description text at the top)…

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/3da163d5111eaa3d2582a8704dbdb77d50a7e2c9.png)

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/94e2d0d6ea85e5f1ed56ea10986864d27709e98d.png)

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [March 3, 2024, 11:42pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/3 "2024-03-03T23:42:43Z")

</div>

Hi @jonnyhtw

Yes that’s expected. Basically Cylc 8 tries harder not to do dodgy things automatically.

Extending the `final cycle point` (FCP) is not as trivial an operation as it may seem. The FCP isn’t necessarily just an arbitrary cut-off in an otherwise infinite sequence. It defines the end of the dependency graph, and the graph can have structure defined relative to the FCP, such as special “shutdown tasks” in the final cycle point(s).

So, if you try to restart, Cylc 8 knows if the original graph already ran to completion, but the scheduler will stay alive to allow you to manually trigger new flows if you extended the graph (either in old cycle points, or by moving the FCP out further). By doing so, you take responsibility for what happens next 🙂

I’ve just tried this in an example, with 8.2.4, and (a) it worked; and (b) the manually triggered task in the new cycles did automatically show up in my GUI. Maybe your browser is misbehaving?

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 4, 2024, 1:09am UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/4 "2024-03-04T01:09:13Z")

</div>

hey @hilary.j.oliver,

thanks a lot for this!

> By doing so, you take responsibility for what happens next 🙂

ok cool that all makes sense, good to know!

> Maybe your browser is misbehaving?

hmm yeah something definitely is misbehaving. i tried refreshing but to no avail, i eventually restarted the UI server and this fixed it but i do seem to be encountering a few instances of the web UI not ‘catching up’ with `cylc tui`’s output. i’ll keep an eye on this and report back if it persists.

thanks a lot,

jonny

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 5, 2024, 10:42pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/5 "2024-03-05T22:42:19Z")

</div>

hi again,

re this same workflow, i triggered the next ‘science’ task in the new final cycle point and this worked fine but it then didn’t trigger subsequent tasks in the cycle point (basically 1, a postprocessing task and 2, a housekeeping task).

this is the relevant bit of the graph (`cylc view -j .` in workflow source dir)…

```auto
 39 P1M ! $ = """
 40 lfric_atm[-P1M] => lfric_atm
 41 postproc[-P1M] => postproc => housekeeping
 42 housekeeping[-P1M] => housekeeping
 43 """

```

the workflow then ran to completion in spite of the fact that neither of the aforementioned tasks actually ran.

is this the expected behaviour?

cheers,

jonny

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 5, 2024, 10:47pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/6 "2024-03-05T22:47:23Z")

</div>

this is the situation after…

```auto
cylc trigger u-db797/run14//19881001T0000Z/postproc

```

where `R1`=19881001T0000Z and the resubmission period is 1 month. note that i have now extended it again to a 3 month run length!

 ![image](https://global.discourse-cdn.com/free1/uploads/cylc1/original/1X/5120afa9302dbe955d33045157a47a624dd75242.png)  
e

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [March 5, 2024, 11:57pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/7 "2024-03-05T23:57:23Z")

</div>

Hi Jonny,

The problem is your intercycle dependencies. Take this example:

```ini
#!Jinja2
[scheduling]
    cycling mode = integer
    final cycle point = {{FCP | default(4) }}
    [[graph]]
        P1 = """
            foo[-P1] => foo => post
            post[-P1] => post
        """
[runtime]
    [[foo, post]]
        script = true

```

If I run this to completion with FCP = 4, then restart with `FCP=7` and manually trigger `5/foo`, all the `foo`s will run then the workflow will stall because `5/post` is waiting on `4/post` - which ran before the workflow originally completed.

```auto
2024-03-06T12:05:55+13:00 INFO - [7/foo running job:01 flows:1] => succeeded
2024-03-06T12:05:55+13:00 INFO - [7/post waiting(runahead) job:00 flows:1] => waiting
2024-03-06T12:05:55+13:00 WARNING - Partially satisfied prerequisites:
      * 5/post is waiting on ['4/post:succeeded'] # <---------------
      * 6/post is waiting on ['5/post:succeeded']
      * 7/post is waiting on ['6/post:succeeded']
2024-03-06T12:05:55+13:00 CRITICAL - Workflow stalled
2024-03-06T12:05:55+13:00 WARNING - PT1H stall timer starts NOW

```

To unstall it, you can manually trigger `5/post` like you did `5/foo`. (Manual trigger means run it despite unsatisfied dependencies).

[Note in principle Cylc could automatically figure out that `4/foo` and `4/post` already ran, but as I commented earlier extending the final cycle point after completion of the workflow is potentially problematic, so (for now at least) you have manually trigger the flow in the newly-extended graph upon restart.]

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 6, 2024, 12:54am UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/8 "2024-03-06T00:54:18Z")

</div>

ok roger that, sounds good, thanks.

i thought what had happened is that the workflow shut down after the ‘new’ `foo` tasks had run even though the new `post` ones hadn’t 🤔

i need to play with this a bit more to get it into my 🧠 !

cheers

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [March 6, 2024, 1:14am UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/9 "2024-03-06T01:14:54Z")

</div>

> [@jonnyhtw](#):
>
> i thought what had happened is that the workflow shut down after the ‘new’ `foo` tasks had run even though the new `post` ones hadn’t 🤔

That’s because partially satisfied tasks (i.e., tasks with at least one, but not all, prerequisites satisfied) are not held in the “n=0” GUI window in Cylc 8.2.x, so if no other tasks are left in the workflow those ones won’t be visible even though they caused a stall - that turned out to be a design error, already corrected for 8.3.0.

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 7, 2024, 10:54pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/10 "2024-03-07T22:54:23Z")

</div>

fyi i’ve run this workflow to completion now and i now understand the difference between ‘stalled with no visible tasks’ and ‘completed’! 🙂 thanks @hilary.j.oliver

---

<div class="post-metadata">

**Author:** ![hilary.j.oliver](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/hilary.j.oliver/32/4_2.png) [@hilary.j.oliver](https://cylc.discourse.group/u/hilary.j.oliver)\
**Post date:** [March 7, 2024, 10:55pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/11 "2024-03-07T22:55:59Z")

</div>

Great, and from 8.3.0 they will be visible)

---

<div class="post-metadata">

**Author:** ![jonnyhtw](https://yyz2.discourse-cdn.com/free1/user_avatar/cylc.discourse.group/jonnyhtw/32/232_2.png) [@jonnyhtw](https://cylc.discourse.group/u/jonnyhtw)\
**Post date:** [March 7, 2024, 10:57pm UTC](https://cylc.discourse.group/t/extending-and-restarting-a-a-workflow/911/12 "2024-03-07T22:57:06Z")

</div>

cool! look forward to having a play with that
