AutomationFlowsGeneral › Redis Scheduled Workflow Manager

Redis Scheduled Workflow Manager

Original n8n title: Redis Schedule

Redis Schedule. Uses executeWorkflow, scheduleTrigger, redis, noOp. Scheduled trigger; 17 nodes.

Cron / scheduled trigger★★★★☆ complexity17 nodesRedis
General Trigger: Cron / scheduled Nodes: 17 Complexity: ★★★★☆ Added:

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "nodes": [
    {
      "id": "3035a456-e783-4ac3-a6b7-1925a81672c1",
      "name": "Execute Workflow",
      "type": "n8n-nodes-base.executeWorkflow",
      "onError": "continueRegularOutput",
      "position": [
        1980,
        440
      ],
      "parameters": {
        "options": {},
        "workflowId": "4cnnwIeC9Sr5ngGZ"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "c2d4d0f3-5f84-41de-9a06-4cd5a19e3337",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        860,
        440
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "seconds",
              "secondsInterval": 5
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "deb51138-4f68-4e8e-8118-d29bd4b79cd6",
      "name": "Get Status",
      "type": "n8n-nodes-base.redis",
      "position": [
        1080,
        440
      ],
      "parameters": {
        "key": "=workflowStatus_{{ $workflow.id }}",
        "options": {},
        "operation": "get",
        "propertyName": "=workflowStatus"
      },
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "73d4e23e-7860-4ac1-8f90-781817e2c98b",
      "name": "Set Running",
      "type": "n8n-nodes-base.redis",
      "position": [
        1760,
        440
      ],
      "parameters": {
        "key": "=workflowStatus_{{ $workflow.id }}",
        "value": "running",
        "operation": "set"
      },
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c7bc785f-dbb0-48be-98ef-d0f940be7749",
      "name": "Set Idle",
      "type": "n8n-nodes-base.redis",
      "position": [
        2200,
        440
      ],
      "parameters": {
        "key": "=workflowStatus_{{ $workflow.id }}",
        "value": "idle",
        "operation": "set"
      },
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f65c374e-f189-4d43-9b45-53776a74cbf2",
      "name": "Continue if Idle",
      "type": "n8n-nodes-base.filter",
      "position": [
        1540,
        360
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "0c6308f0-1c96-41a9-b821-97031454d555",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.workflowStatus }}",
              "rightValue": "idle"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "45956f6b-52bf-48d2-8c68-0aa1fa338f8f",
      "name": "Redis Key exists",
      "type": "n8n-nodes-base.if",
      "position": [
        1300,
        440
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "a844597a-21f9-4869-9abb-4e4b1530931a",
              "operator": {
                "type": "string",
                "operation": "notEmpty",
                "singleValue": true
              },
              "leftValue": "={{ $json.workflowStatus }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "29896363-cb31-4940-9cef-a993b931484d",
      "name": "No Operation",
      "type": "n8n-nodes-base.noOp",
      "position": [
        1540,
        520
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7a8b0ceb-0c9c-4aa5-9cbb-68a7aee3641f",
      "name": "When clicking \"Test workflow\"",
      "type": "n8n-nodes-base.manualTrigger",
      "disabled": true,
      "position": [
        860,
        740
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d9ab7f18-fe96-4514-a576-49e50575185f",
      "name": "Reset to Idle",
      "type": "n8n-nodes-base.redis",
      "disabled": true,
      "position": [
        1080,
        740
      ],
      "parameters": {
        "key": "=workflowStatus_{{ $workflow.id }}",
        "value": "idle",
        "operation": "set"
      },
      "credentials": {
        "redis": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "043e00ca-d191-4b54-b0ec-c14e87a5facb",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        811,
        614
      ],
      "parameters": {
        "color": 5,
        "width": 433,
        "height": 300,
        "content": "## Troubleshooting\nUnplanned server outage? Need to reset the flag? Disable the schedule trigger, activate these nodes and run the **Reset to Idle** node manually."
      },
      "typeVersion": 1
    },
    {
      "id": "dc045338-4e41-41f3-b197-704e7560c54a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        320
      ],
      "parameters": {
        "color": 7,
        "width": 222,
        "height": 281,
        "content": "This updates the flag, indicating, that the workflow is currently running"
      },
      "typeVersion": 1
    },
    {
      "id": "5b8dae2f-c2cf-4e16-b4a2-bc97bb64b9e0",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        810.8170310701956,
        320
      ],
      "parameters": {
        "width": 205.18296892980436,
        "height": 280,
        "content": "## Set Interval\nDefine how frequently the main workflow should run."
      },
      "typeVersion": 1
    },
    {
      "id": "d55419d3-84e4-4b73-ae4c-a719d94f9bae",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1248,
        286
      ],
      "parameters": {
        "color": 7,
        "width": 445,
        "height": 382,
        "content": "If the flag stored in Redis already exists and indicates, that the worklow is still running, another execution will be prevented. In that case this workflow ends here."
      },
      "typeVersion": 1
    },
    {
      "id": "55ab702d-0feb-4d13-a42c-f9aed6d4389d",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1920,
        320
      ],
      "parameters": {
        "width": 218,
        "height": 281,
        "content": "## Set Workflow ID\nSet the ID of the main workflow which should be executed\n"
      },
      "typeVersion": 1
    },
    {
      "id": "7d469990-d3d7-41a1-9a59-7fcf76472342",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1020,
        320
      ],
      "parameters": {
        "color": 7,
        "width": 222,
        "height": 281,
        "content": "This checks for a dynamic flag (containing the workflow ID) which represents if the workflow is currently running."
      },
      "typeVersion": 1
    },
    {
      "id": "0d96a5e4-40a2-4abf-96be-7e17c187bc3d",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2140,
        320
      ],
      "parameters": {
        "color": 7,
        "width": 222,
        "height": 281,
        "content": "This updates the flag, indicating, that the workflow is currently idle"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Get Status": {
      "main": [
        [
          {
            "node": "Redis Key exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Running": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "No Operation": {
      "main": [
        [
          {
            "node": "Set Running",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Continue if Idle": {
      "main": [
        [
          {
            "node": "Set Running",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Execute Workflow": {
      "main": [
        [
          {
            "node": "Set Idle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Redis Key exists": {
      "main": [
        [
          {
            "node": "Continue if Idle",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "No Operation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Get Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \"Test workflow\"": {
      "main": [
        [
          {
            "node": "Reset to Idle",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

This workflow automates the execution of scheduled tasks using Redis to manage their status, ensuring reliable and conflict-free runs without overlapping processes. It suits teams or developers handling periodic automations, such as daily reports or batch updates, who need a simple way to prevent duplicate executions. The key step involves checking Redis for an idle status before proceeding, allowing the workflow to either run or skip based on availability, integrated seamlessly with Redis for state management.

Use this workflow for cron-based tasks requiring mutual exclusion, like nightly data syncs or maintenance jobs, where Redis tracks running states to avoid interruptions. Avoid it for real-time or one-off triggers, as it's designed for fixed schedules; opt for simpler cron setups without status checks if overlaps aren't an issue. Common variations include adding email notifications on completion or integrating with tools like Google Sheets for logging results.

About this workflow

Redis Schedule. Uses executeWorkflow, scheduleTrigger, redis, noOp. Scheduled trigger; 17 nodes.

Source: https://github.com/Zie619/n8n-workflows — original creator credit. Request a take-down →

More General workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

General

This template creates a nightly backup of all n8n workflows and saves them to a Google Drive folder. Each night, the previous night's backups are moved to an “n8n_old” folder and renamed with the corr

Move Binary Data, Google Drive, Item Lists +1
General

Code Itemlists. Uses stickyNote, moveBinaryData, googleDrive, itemLists. Scheduled trigger; 33 nodes.

Move Binary Data, Google Drive, Item Lists +1
General

This workflow is perfect for n8n users who want to automatically backup all their workflows 💾 to Google Drive with zero manual effort. Perfect for teams managing multiple workflows or anyone who value

n8n, Google Drive
General

Shopify to Google Sheets Product Sync Automation. Uses noOp, graphql, googleSheets, scheduleTrigger. Scheduled trigger; 25 nodes.

GraphQL, Google Sheets
General

Wait Code. Uses scheduleTrigger, markdown, splitInBatches, rssFeedRead. Scheduled trigger; 23 nodes.

RSS Feed Read, Google Sheets