Skip to main content

Random Process Scheduler

Workflow preview

Workflow preview
100%
Random Process Scheduler preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Random Process Scheduler Turn predictable automations into human like activity with random scheduling across easily customisable time slots. Perfect for content publishing with organic scheduling p...

Best for

  • Miscellaneous automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.executeworkflow, n8n-nodes-base.n8n, n8n-nodes-base.stickynote, n8n-nodes-base.readwritefile, n8n-nodes-base.stopanderror, n8n-nodes-base.code, n8n-nodes-base.scheduletrigger, n8n-nodes-base.switch

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Florent.

Original n8n.io source

1.1 Workflow description

Title
Random Process Scheduler
Workflow name
Random Process Scheduler

Random Process Scheduler

Turn predictable automations into human-like activity with random scheduling across easily customisable time slots.

Perfect for content publishing with organic scheduling patterns, social media automation, API systems that need to avoid rate limiting, or any automation requiring randomised timing control across multiple periods.

All times are configured in local timezone with automatic UTC conversion for technical operations.

Features easy slot management with chronological ordering, gap support, and 24-hour window scheduling.

How to use

  • Set schedulerExecutionTime in Init node (match it to Schedule Trigger cron)
  • Define time slots with start/end hours and probability values (see below)
  • Configure Execute sub-process with your own workflow ID
  • Configure SMTP credentials, local time zone and optionally project paths

Step by Step Configuration

Two variables to set in the Init node's "Custom Configuration" section:

1. When the scheduler runs daily:

const schedulerExecutionTime = 1; // 1am (24h clock; must match Schedule Trigger node)

2. Your execution slots:

const subprocessTimeSlots = {
  morning: { start: 6, end: 12, probability: 0.85 },
  afternoon: { start: 12, end: 18, probability: 0.85 },
  evening: { start: 18, end: 24, probability: 0.5 }
};

That's it. Three slots, three probabilities.

Add or remove slots, adjust times - it just works.

Real-world example with gaps:

const subprocessTimeSlots = {
  night: { start: 0, end: 2, probability: 0.1 },      // Optional late activity
  morning: { start: 6, end: 10, probability: 0.85 },  // Gap from 2-6am (no execution)
  noon: { start: 12, end: 14, probability: 0.85 },    // Gap from 10am-12pm
  afternoon: { start: 16, end: 18, probability: 0.85 }, // Gap from 2-4pm
  evening: { start: 20, end: 24, probability: 0.5 }   // Gap from 6-8pm
};

3. Configure Execute sub-process with your workflow ID

Your sub-workflow MUST start with a Wait node and be configured with {{ $json.executions.relativeDelaySeconds }} as “Wait Amount”.

4. Additional Configuration

  • SMTP credential
  • Time zone (Init node): const LOCAL_TIMEZONE = $env.GENERIC_TIMEZONE || 'Europe/Paris'; by default
  • Project paths (Init node):
// ⚠️ Your email here
• const N8N_ADMIN_EMAIL = $env.N8N_ADMIN_EMAIL || '[email protected]';

// ⚠️ Your projects’ ROOT folder on your mapped server here
• const N8N_PROJECTS_DIR = $env.N8N_PROJECTS_DIR || '/files/n8n-projects-data';

// ⚠️ Your project’s folder name here for logging
• const PROJECT_FOLDER_NAME = "RPS";

Requirements

  • n8n instance running in Docker with file system access
  • Volume mapping for persistent storage (e.g., /local-files:/files)
  • De-activate Read/Write nodes & Email sends if you do not want to use logging features (file system access optional)
  • SMTP server for notifications
  • n8n API credentials for error handling
  • Target sub-workflow with Wait node to handle relativeDelaySeconds

IMPORTANT: Your sub-workflow MUST start with a Wait node and be configured with {{ $json.executions.relativeDelaySeconds }} as “Wait Amount”.

How it works

  • 24-Hour Window Algorithm: Schedules executions from current time until next scheduler run, handling timezone conversions and cross-midnight scenarios
  • Automatic Validation: Checks for overlaps, invalid time ranges, and probability values on every run
  • Chronological Processing: Processes slots in order regardless of how you define them
  • Inclusive/Exclusive Boundaries: 6-12 slot runs from 6:00:00 to 11:59:59 (start inclusive, end exclusive)
  • Chained Execution: Each subprocess receives a relativeDelaySeconds value for sequential execution with calculated intervals
  • Comprehensive Monitoring: Tracks planned vs actual execution times with delay calculations and detailed logging

Configuration Rules

  • No Overlap: Slots cannot overlap (6-10 and 9-12 is invalid)
  • Valid Ranges: Start 0-23, end 0-24, start < end
  • Valid Probability: 0 to 1 (0.85 = 85% chance)
  • Gaps Allowed: Skip hours completely (e.g., no execution 2-6am)
  • Emoji Support: Use "night", "morning", "noon", "evening" keywords in slot names for visual logs

Use Cases:

  • Content publishing with organic scheduling patterns
  • Social media automation with human-like posting intervals
  • API systems avoiding rate limits through unpredictable timing
  • Business hours automation with precise timing control

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Execute sub-process

Type / Role
n8n-nodes-base.executeWorkflow - executeWorkflow
Config choices
Version 1.2

Block 2 - Get Sub-workflow Name

Type / Role
n8n-nodes-base.n8n - n8n
Config choices
Version 1

Block 3 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Append Planning File

Type / Role
n8n-nodes-base.readWriteFile - readWriteFile
Config choices
Version 1

Block 5 - Read Planning File

Type / Role
n8n-nodes-base.readWriteFile - readWriteFile
Config choices
Version 1

Block 6 - ERROR: Execute Sub-worflow

Type / Role
n8n-nodes-base.stopAndError - stopAndError
Config choices
Version 1

Block 7 - Monitoring

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - ERROR: Monitoring

Type / Role
n8n-nodes-base.stopAndError - stopAndError
Config choices
Version 1

Block 9 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 10 - Go/no go

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 11 - Daily Scheduler

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 12 - Init

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 13 - NOTHING Planned Email

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 14 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 15 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 16 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 17 - Write Planning File

Type / Role
n8n-nodes-base.readWriteFile - readWriteFile
Config choices
Version 1

Block 18 - Send planning

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 19 - Write Log File

Type / Role
n8n-nodes-base.readWriteFile - readWriteFile
Config choices
Version 1

Block 20 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 21 - Split Out

Type / Role
n8n-nodes-base.splitOut - splitOut
Config choices
Version 1

Block 22 - ERROR: Daily Scheduler

Type / Role
n8n-nodes-base.stopAndError - stopAndError
Config choices
Version 1

Block 23 - FINAL SUCCESS Email

Type / Role
n8n-nodes-base.emailSend - emailSend
Config choices
Version 2.1

Block 24 - Read Final Planning File

Type / Role
n8n-nodes-base.readWriteFile - readWriteFile
Config choices
Version 1

Showing the first 24 of 32 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Random Process Scheduler
Complexity advanced
Nodes 32
Categories Miscellaneous
Author Florent
Published 07 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9351/9351.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Random Process Scheduler do?

Random Process Scheduler Turn predictable automations into human like activity with random scheduling across easily customisable time slots. Perfect for content publishing with organic scheduling p...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Miscellaneous use case.