Stop Active Workflow from cmd

I had installed n8n on my laptop, and created a workflow, worked well until i started n8n again from CLI and the it showed type o to open in browser and when i try to open the browser laptop freezes and i need to restart.

I have been searching for a way to start n8n since then, but no solution since every time i start it via CLI it says Active workflow started and laptop freezes.

Any appropriate solution would be much appreciated.

I have executed a cron function which triggers every minute.

Hi @AltonDsouza, welcome to the community!

If you know the ID of the workflow, you can use something this:

n8n update:workflow --id=5 --active=false

In case you are not sure about the ID, the following command can help you deactivate all the active workflows.

n8n update:workflow --all --active=false

Hope that helps! Have fun! :slight_smile:

2 Likes

Thanks @tanay for the reply. It fixed my problem. Where can i find the additional commands??

Thank You.

Glad to hear that @Kevin_Dsouza! You can find additional commands in our documentation here. We do need to update that page with the commands that I mentioned above :slight_smile:

1 Like

@tanay I install n8n via Docker
How can I use the CLI?

1 Like

You can either run it directly:

docker run -it --rm -v ~/.n8n:/home/node/.n8n n8nio/n8n n8n update:workflow --id=5 --active=false

or first start bash and then run the command

docker run -it --rm -v ~/.n8n:/home/node/.n8n n8nio/n8n /bin/sh
n8n update:workflow --id=5 --active=false
4 Likes