Active/ Deactive the workflow?

Hi @jan @tanay

Hope you doing good.

Here I have one doubt,

I have a workflow with started with the cron job node. Then I want to stop and start the cron job at a certain level.

n8n update:workflow --id=2 --active=false
n8n update:workflow --id=2 --active=true

those commands will work?

Because currently, I receive msg from the cron even though it’s deactivated.

Note: I am running n8n in local, not in any sever.

Thanks.

Hey @rajesh-kumar, there is no need to mention individual members on the forum if you just have a new question…

I have quickly checked this on my side by running a docker container and can confirm the behaviour. As such I shall add this to our internal bug tracker for a closer look.

Please accept my apologies for the inconvenience this causes.

@MutedJam.

It’s Ok. Thanks and sorry for my mistakes.

Hello @rajesh-kumar

I was looking at this issue and the command you’re using should be used only for maintenance, when you have a workflow that is problematic and might bring your instance down. In this case, you stop n8n, signal the database that this workflow should no longer execute and then start it again.

When the instance is running fine, you should disable workflows via UI or via the Public API that has been released: The n8n public API - n8n Documentation

Would you mind sharing why you want to disable the workflows via CLI?