# How to stop the running workflow?

**URL:** <https://aiida.discourse.group/t/how-to-stop-the-running-workflow/314>\
**Category:** New to AiiDA\
**Created:** [February 29, 2024, 11:59pm UTC](https://aiida.discourse.group/t/how-to-stop-the-running-workflow/314 "2024-02-29T23:59:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rkarkee](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@rkarkee](https://aiida.discourse.group/u/rkarkee)\
**Post date:** [February 29, 2024, 11:59pm UTC](https://aiida.discourse.group/t/how-to-stop-the-running-workflow/314/1 "2024-02-29T23:59:44Z")

</div>

Hi all,

I have this status

```auto
(aiidaENV) rkarkee@ch-fe2:/lustre/scratch5/rkarkee> verdi process list -L IRamanSpectraWorkChain
  PK Created Process label ♻ Process State Process status
---- --------- ---------------------- --- --------------- -------------------------------
  24 7h ago IRamanSpectraWorkChain ⏵ Waiting Waiting for child processes: 26
  76 20m ago IRamanSpectraWorkChain ⏹ Created

(aiidaENV) rkarkee@ch-fe2:/lustre/scratch5/rkarkee> verdi process list
  PK Created Process label ♻ Process State Process status
---- --------- ---------------------- --- --------------- ---------------------------------------
  24 7h ago IRamanSpectraWorkChain ⏵ Waiting Waiting for child processes: 26
  26 7h ago HarmonicWorkChain ⏵ Waiting Waiting for child processes: 38
  38 7h ago DielectricWorkChain ⏵ Waiting Waiting for child processes: 45
  45 7h ago PwBaseWorkChain ⏵ Waiting Waiting for child processes: 51
  51 7h ago PwCalculation ⏵ Waiting Monitoring scheduler: job state RUNNING
  76 30m ago IRamanSpectraWorkChain ⏹ Created

Total results: 6

Report: ♻ Processes marked with check-mark were not run but taken from the cache.
Report: Add the option `-P pk cached_from` to the command to display cache source.
Report: Last time an entry changed state: 30m ago (at 16:28:51 on 2024-02-29)
Report: Checking daemon load... OK
Report: Using 2% of the available daemon worker slots.

```

How can I kill or stop Pk=24? or workflow related to Pk=24?

---

<div class="post-metadata">

**Author:** ![t-reents](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/t-reents/32/82_2.png) [@t-reents](https://aiida.discourse.group/u/t-reents)\
**Post date:** [March 1, 2024, 11:04am UTC](https://aiida.discourse.group/t/how-to-stop-the-running-workflow/314/2 "2024-03-01T11:04:00Z")

</div>

Hi @rkarkee

In general, to `kill` a process, you can just run:

```auto
verdi process kill 24

```

This will also `kill` all subsequent processes that belong to the parent `IRamanSpectraWorkChain` with `pk=24`.

---

<div class="post-metadata">

**Author:** ![rkarkee](https://avatars.discourse-cdn.com/v4/letter/r/a88e4f/32.png) [@rkarkee](https://aiida.discourse.group/u/rkarkee)\
**Post date:** [March 1, 2024, 3:32pm UTC](https://aiida.discourse.group/t/how-to-stop-the-running-workflow/314/3 "2024-03-01T15:32:34Z")

</div>

Hi @t-reents

I had tried that but this got this error;

```auto
(aiidaENV) rkarkee@ch-fe2:~> verdi process kill 24
Error: failed to kill Process<24>: Instance <DbNode at 0x15408bb74e10> is not bound to a Session; attribute refresh operation cannot proceed (Background on this error at: https://sqlalche.me/e/20/bhk3)

```
