đź”§ Random Process Scheduler

⚡ 50 views · 🔧 Miscellaneous

Description

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

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”.

RPS Community Description20251005164526603.png

4. Additional Configuration

// ⚠️ Your email here
• const N8N_ADMIN_EMAIL = $env.N8N_ADMIN_EMAIL || 'yourmail@world.com';

// ⚠️ 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

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

How it works

Configuration Rules

Use Cases:

đź”— Nodes Used

Send Email, Execute Sub-workflow, Stop and Error, n8n, Schedule Trigger, Read/Write Files from Disk

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup