Stop a workflow from a cycle, killing future tasks

I was wondering if there was a neat way to do cylc stop workflow//20250601T0000Z, killing tasks which may be running after that cycle? I know you can do cylc kill on a glob pattern matching various cycles, but that is extra steps. I had hoped I could do cylc stop --kill workflow//20250601T0000Z and it would have the smarts to kill future tasks, but no, I just got an error.

No, if you tell the scheduler to stop at cycle N but there are already tasks running at cycles > N, you’ll need to either kill them or wait for them to finish, then the scheduler will shut down.

Interesting question though. Perhaps tasks running beyond a newly-set stop cycle should be killed automatically as standard behaviour. :thinking:

Haven’t been asked for this before. You can hold after a cycle, but not kill (without glob):

cylc hold --after=20250601T0000Z
cylc stop workflow//20250601T0000Z

I don’t think standard behaviour. But, I do think being able to do cylc stop --kill workflow//cycle and having it kill any tasks after that cycle would be nice to be able to do. But, I wouldn’t be so confident of something like workflow//cycle/task because what is “after” that task may be a bit more arbitrary.

But, thinking about it, is it possible for someone to have something like task_1[+PT1H] => task_2 - so a positive look ahead in the graph? In which case --kill would break that.