diff --git a/cylc/flow/task_pool.py b/cylc/flow/task_pool.py index 38d4a5e3a9c..d4a87c82570 100644 --- a/cylc/flow/task_pool.py +++ b/cylc/flow/task_pool.py @@ -1398,8 +1398,11 @@ def force_trigger_tasks( or self._get_hidden_task_by_id(task_id) ) if itask is None: - # Spawn with new flow number. - flow_nums = {self.flow_mgr.get_new_flow(flow_descr)} + # Spawn with new flow number, unless no reflow. + if reflow: + flow_nums = {self.flow_mgr.get_new_flow(flow_descr)} + else: + flow_nums = set() itask = self.spawn_task(name, point, flow_nums) if itask is None: continue diff --git a/tests/functional/spawn-on-demand/10-retrigger/flow.cylc b/tests/functional/spawn-on-demand/10-retrigger/flow.cylc index 73dd23ae388..d0b614bf5b0 100644 --- a/tests/functional/spawn-on-demand/10-retrigger/flow.cylc +++ b/tests/functional/spawn-on-demand/10-retrigger/flow.cylc @@ -18,7 +18,8 @@ """ [[triggerer]] script = """ - cylc__job__poll_grep_workflow_log '\[oops\.1\].* (received)failed' + cylc__job__poll_grep_workflow_log -E \ + 'oops\.1 running .* \(received\)failed' cylc trigger ${CYLC_WORKFLOW_NAME} oops.1 """ [[foo, bar]]