# Parallel Workflow

**URL:** <https://community.n8n.io/t/parallel-workflow/13058>\
**Category:** Questions\
**Created:** [April 11, 2022, 3:34pm UTC](https://community.n8n.io/t/parallel-workflow/13058 "2022-04-11T15:34:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Siddu](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/siddu/32/12344_2.png) [@Siddu](https://community.n8n.io/u/Siddu)\
**Post date:** [April 11, 2022, 3:34pm UTC](https://community.n8n.io/t/parallel-workflow/13058/1 "2022-04-11T15:34:00Z")

</div>

Hi Team  
I have a simple workflow where i am trying to avoid parallel run of my workflow.  
eg. If my workflow executes every 5 mins and my execute command node takes 10 mins to complete, i don’t want the next execution to start unless my previous one gets completed.  
Is there a possibility like this in N8N?

Regards  
Siddu

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [April 11, 2022, 3:56pm UTC](https://community.n8n.io/t/parallel-workflow/13058/2 "2022-04-11T15:56:23Z")

</div>

Hey @Siddu,

For now the best option I can think of would be to set an “isRunning” option either in a database or as a local file and check to see if it exists at the start of a workflow and create it if it doesn’t and remove it at the end.

---

<div class="post-metadata">

**Author:** ![TheFSilver](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thefsilver/32/4791_2.png) [@TheFSilver](https://community.n8n.io/u/TheFSilver)\
**Post date:** [April 11, 2022, 4:22pm UTC](https://community.n8n.io/t/parallel-workflow/13058/3 "2022-04-11T16:22:01Z")

</div>

There’s actually a way.  
Here’s how I do it.

It consists of two workflows:  
One workflow that Activate / Desactivate another workflow like this

Make sure to replace the domain “[yourdomain.com](http://yourdomain.com)” by your actual instance domain on the url in the nodes named “Get n8n JWT”, “Get workflow”, “Deactivate” and “Activate”.

and the second workflow where you would have to replace the Set node named “Your workflow here” by your whole workflow.

Then all you gotta do is:

- replace the 777 by the workflowID of your workflow in the nodes named “Desactivate workflow” and “Activate workflow”
- replace the 220 by the workflowID of the workflow that Activate/Desactivate other workflows in the nodes named “Execute Workflow” and “Execute Workflow1”

Hope it helps.  
I’m not sure I can be more specific ahah.

---

<div class="post-metadata">

**Author:** ![Jon](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jon/32/40174_2.png) [@Jon](https://community.n8n.io/u/Jon)\
**Post date:** [April 12, 2022, 7:06am UTC](https://community.n8n.io/t/parallel-workflow/13058/4 "2022-04-12T07:06:04Z")

</div>

@TheFSilver that is pretty cool and a good solution for a scheduled workflow, Nice work.

---

<div class="post-metadata">

**Author:** ![TheFSilver](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/thefsilver/32/4791_2.png) [@TheFSilver](https://community.n8n.io/u/TheFSilver)\
**Post date:** [April 14, 2022, 12:42pm UTC](https://community.n8n.io/t/parallel-workflow/13058/5 "2022-04-14T12:42:26Z")

</div>

Thanks @Jon  
I used that thread and built it on top of it.

> [@Credential unauthorized](http://community.n8n.io/t/credential-unauthorized/12229):
>
> hello, since i have updated the n8n to latest version, i am unable to obtain workflow using basic authorization. I have not create a user account, and basic authorization is setup during docker install.
