neuralmind

Scheduling NeuralMind Operations

Automate NeuralMind commands to run on a schedule for continuous codebase monitoring, audit trail generation, and compliance reporting. This guide covers Windows Task Scheduler, GitHub Actions, and other scheduling approaches for any project.

Table of Contents


Quick Start

On Windows

# 1. Create a PowerShell script (see below)
# 2. Run PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# 3. Register the scheduled task (see Windows Task Scheduler section)

On Linux/macOS

# Add to crontab (see Cron section)
crontab -e

On GitHub (any platform)

Push a workflow file to .github/workflows/neuralmind-audit.yml (see GitHub Actions section)


Understanding Project Paths

NeuralMind commands always operate on a project root directory. The structure matters:

your-project/
β”œβ”€β”€ graph.json          # Generated by graphify
β”œβ”€β”€ neuralmind.db/      # Generated by neuralmind build
β”œβ”€β”€ src/
β”œβ”€β”€ tools/
└── ...

When scheduling, you need to:

  1. Know the absolute path to your project
  2. Ensure graph.json and neuralmind.db/ exist (run graphify build && neuralmind build . once)
  3. Point the scheduler to that path

Common paths:

Windows:
  C:\Users\{username}\Projects\video_toolkit
  C:\Users\{username}\Projects\ibkr-traderbot
  C:\Users\{username}\Projects\neuralmind

Linux/macOS:
  /home/{username}/projects/video_toolkit
  /home/{username}/projects/neuralmind
  ~/Code/my-project

Windows Task Scheduler

Step 1: Create the script at a persistent location like C:\scripts\run-neuralmind.ps1:

# ============================================================
# NeuralMind Scheduled Suite Runner
# Runs a full NeuralMind analysis on a project and logs output
# ============================================================

param(
    [string]$ProjectPath = $(throw "ProjectPath parameter required"),
    [string]$LogDir = "$env:USERPROFILE\Documents\neuralmind-logs"
)

# Validate project exists
if (!(Test-Path $ProjectPath)) {
    Write-Error "Project path does not exist: $ProjectPath"
    exit 1
}

# Ensure log directory exists
if (!(Test-Path $LogDir)) { 
    New-Item -ItemType Directory -Path $LogDir | Out-Null 
}

# Create log file with timestamp
$timestamp = Get-Date -Format "yyyy-MM-dd_HHmmss"
$logFile = "$LogDir\neuralmind-$(Split-Path $ProjectPath -Leaf)_$timestamp.log"

function Log {
    param([string]$Message)
    $msg = "[$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')] $Message"
    Write-Host $msg
    Add-Content -Path $logFile -Value $msg
}

try {
    Log "=== Starting NeuralMind Suite on $ProjectPath ==="
    
    # Change to project directory
    Push-Location $ProjectPath
    
    # Run wakeup
    Log "Running neuralmind wakeup..."
    neuralmind wakeup . 2>&1 | ForEach-Object { Log $_ }
    
    # Run queries
    Log "Running cost tracking query..."
    neuralmind query . "How does the cost tracking work?" 2>&1 | ForEach-Object { Log $_ }
    
    Log "Running audio processing query..."
    neuralmind query . "What audio processing utilities are available?" 2>&1 | ForEach-Object { Log $_ }
    
    # Run skeletons
    Log "Analyzing key files..."
    if (Test-Path "tools/sfx.py") {
        neuralmind skeleton tools/sfx.py 2>&1 | ForEach-Object { Log $_ }
    }
    if (Test-Path "tools/cost_tracker.py") {
        neuralmind skeleton tools/cost_tracker.py 2>&1 | ForEach-Object { Log $_ }
    }
    
    # Run searches
    Log "Searching for key entities..."
    neuralmind search . "CostTracker" 2>&1 | ForEach-Object { Log $_ }
    neuralmind search . "parse_args" 2>&1 | ForEach-Object { Log $_ }
    
    # Generate audit reports
    $auditJson = "$LogDir\audit_$(Split-Path $ProjectPath -Leaf)_$timestamp.json"
    $auditMd = "$LogDir\audit_$(Split-Path $ProjectPath -Leaf)_$timestamp.md"
    
    Log "Generating audit reports..."
    neuralmind audit-report . --format json --output $auditJson 2>&1 | ForEach-Object { Log $_ }
    neuralmind audit-report . --format markdown --output $auditMd 2>&1 | ForEach-Object { Log $_ }
    
    Log "=== Run Complete ==="
    Log "Logs saved to: $logFile"
    Log "Audit reports: $auditJson, $auditMd"
    
} catch {
    Log "ERROR: $_"
    exit 1
} finally {
    Pop-Location
}

Step 2: Test the script manually

Open PowerShell and run:

# For video_toolkit
C:\scripts\run-neuralmind.ps1 -ProjectPath "C:\Users\dtfro\claudecode\video_toolkit"

# For neuralmind repo itself
C:\scripts\run-neuralmind.ps1 -ProjectPath "C:\Users\dtfro\claudecode\neuralmind"

Step 3: Register scheduled task (run PowerShell as Administrator):

# Set execution policy
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# For video_toolkit - daily at 2 AM
$trigger = New-ScheduledTaskTrigger -Daily -At 2am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\scripts\run-neuralmind.ps1 -ProjectPath 'C:\Users\dtfro\claudecode\video_toolkit'"
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -RunOnlyIfNetworkAvailable
Register-ScheduledTask -TaskName "NeuralMind Suite - video_toolkit" -Trigger $trigger -Action $action -Settings $settings -RunLevel Highest -Description "Daily NeuralMind audit for video_toolkit"

# For neuralmind repo - daily at 3 AM
$trigger = New-ScheduledTaskTrigger -Daily -At 3am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\scripts\run-neuralmind.ps1 -ProjectPath 'C:\Users\dtfro\claudecode\neuralmind'"
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -RunOnlyIfNetworkAvailable
Register-ScheduledTask -TaskName "NeuralMind Suite - neuralmind" -Trigger $trigger -Action $action -Settings $settings -RunLevel Highest -Description "Daily NeuralMind audit for neuralmind repo"

Step 4: Verify in Task Scheduler GUI

  1. Open Task Scheduler
  2. Navigate to Task Scheduler Library
  3. Find tasks named β€œNeuralMind Suite - *”
  4. Right-click β†’ Run to test
  5. Check logs in %USERPROFILE%\Documents\neuralmind-logs

Batch Script

For simpler setups without PowerShell scripting, create C:\scripts\run-neuralmind.bat:

@echo off
REM Usage: run-neuralmind.bat "C:\path\to\project"

if "%~1"=="" (
    echo Usage: run-neuralmind.bat "C:\path\to\project"
    exit /b 1
)

set PROJECT_PATH=%~1
set LOGDIR=%USERPROFILE%\Documents\neuralmind-logs
if not exist "%LOGDIR%" mkdir "%LOGDIR%"

REM Create timestamp
for /f "tokens=2-4 delims=/ " %%a in ('date /t') do set mydate=%%c-%%a-%%b
for /f "tokens=1-2 delims=/:" %%a in ('time /t') do set mytime=%%a%%b
set LOGFILE=%LOGDIR%\neuralmind-%mydate%_%mytime%.log

cd /d "%PROJECT_PATH%"
echo Running NeuralMind Suite on %PROJECT_PATH% >> %LOGFILE%
neuralmind wakeup . >> %LOGFILE% 2>&1
neuralmind audit-report . --format json --output %LOGDIR%\audit.json >> %LOGFILE% 2>&1
neuralmind audit-report . --format markdown --output %LOGDIR%\audit.md >> %LOGFILE% 2>&1
echo Done >> %LOGFILE%

Register in Task Scheduler with:

$trigger = New-ScheduledTaskTrigger -Daily -At 2am
$action = New-ScheduledTaskAction -Execute "cmd.exe" -Argument '/c C:\scripts\run-neuralmind.bat "C:\Users\dtfro\claudecode\video_toolkit"'
Register-ScheduledTask -TaskName "NeuralMind - video_toolkit" -Trigger $trigger -Action $action -RunLevel Highest

Setup Instructions

  1. Save the script to C:\scripts\run-neuralmind.ps1 (create C:\scripts if needed)
  2. Enable PowerShell (Administrator):
    Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
    
  3. Test manually before scheduling
  4. Register tasks for each project you want to monitor
  5. Monitor logs in %USERPROFILE%\Documents\neuralmind-logs

GitHub Actions

For continuous, automated auditing within your repository, use GitHub Actions. This works for any project on GitHub.

Basic Setup

Create .github/workflows/neuralmind-audit.yml:

name: NeuralMind Audit Suite

on:
  schedule:
    # Daily at 2 AM UTC (adjust as needed)
    - cron: '0 2 * * *'
  workflow_dispatch:  # Allow manual trigger

jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      
      - name: Install NeuralMind and graphify
        run: |
          pip install neuralmind
          git clone https://github.com/safishamsi/graphify.git
          cd graphify && pip install -e .
      
      - name: Generate code graph
        run: graphify build
      
      - name: Build NeuralMind index
        run: neuralmind build .
      
      - name: Run NeuralMind suite
        run: |
          mkdir -p neuralmind-audit
          neuralmind wakeup . > neuralmind-audit/wakeup.txt
          neuralmind query . "How does the cost tracking work?" > neuralmind-audit/cost-tracking.txt
          neuralmind audit-report . --format json --output neuralmind-audit/audit.json
          neuralmind audit-report . --format markdown --output neuralmind-audit/audit.md
      
      - name: Upload audit artifacts
        uses: actions/upload-artifact@v3
        with:
          name: neuralmind-audit-$
          path: neuralmind-audit/
          retention-days: 30

Multi-Project Setup

If you want to audit multiple projects from one repo, create separate workflows or use a matrix:

name: Multi-Project NeuralMind Audit

on:
  schedule:
    - cron: '0 2 * * *'
  workflow_dispatch:

jobs:
  audit:
    strategy:
      matrix:
        project:
          - name: main-project
            path: .
          - name: subproject-a
            path: ./subprojects/a
          - name: subproject-b
            path: ./subprojects/b
    
    runs-on: ubuntu-latest
    
    steps:
      - uses: actions/checkout@v4
      
      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.11'
      
      - name: Install NeuralMind and graphify
        run: |
          pip install neuralmind
          git clone https://github.com/safishamsi/graphify.git
          cd graphify && pip install -e .
      
      - name: Generate graph and index for $
        run: |
          cd $
          graphify build
          neuralmind build .
      
      - name: Run audit for $
        run: |
          cd $
          mkdir -p ../neuralmind-audit-$
          neuralmind wakeup . > ../neuralmind-audit-$/audit.txt
          neuralmind audit-report . --format json --output ../neuralmind-audit-$/audit.json
      
      - name: Upload artifacts
        uses: actions/upload-artifact@v3
        with:
          name: audit-$-$
          path: neuralmind-audit-$/

Cron / Linux / macOS

Crontab Setup

Edit your crontab:

crontab -e

Add entries for each project:

# Daily at 2 AM - video_toolkit
0 2 * * * cd ~/projects/video_toolkit && neuralmind wakeup . >> ~/neuralmind-logs/video_toolkit.log 2>&1

# Daily at 3 AM - neuralmind repo
0 3 * * * cd ~/projects/neuralmind && neuralmind wakeup . >> ~/neuralmind-logs/neuralmind.log 2>&1

# Weekly audit reports - every Sunday at 1 AM
0 1 * * 0 cd ~/projects/video_toolkit && neuralmind audit-report . --format json --output ~/neuralmind-logs/audit-$(date +\%Y\%m\%d).json 2>&1

Bash Script Wrapper

Create ~/scripts/neuralmind-scheduler.sh:

#!/bin/bash
# NeuralMind scheduler for multiple projects

PROJECTS=(
    "/home/user/projects/video_toolkit"
    "/home/user/projects/neuralmind"
    "/home/user/projects/ibkr-traderbot"
)

LOGDIR="$HOME/neuralmind-logs"
mkdir -p "$LOGDIR"

for PROJECT in "${PROJECTS[@]}"; do
    if [ ! -d "$PROJECT" ]; then
        echo "Skipping $PROJECT (not found)" >> "$LOGDIR/scheduler.log"
        continue
    fi
    
    TIMESTAMP=$(date +"%Y-%m-%d_%H%M%S")
    LOGFILE="$LOGDIR/$(basename $PROJECT)_$TIMESTAMP.log"
    
    cd "$PROJECT"
    echo "=== NeuralMind run for $PROJECT at $TIMESTAMP ===" >> "$LOGFILE"
    neuralmind wakeup . >> "$LOGFILE" 2>&1
    neuralmind audit-report . --format json --output "$LOGDIR/audit-$(basename $PROJECT)-$TIMESTAMP.json" >> "$LOGFILE" 2>&1
    echo "Complete" >> "$LOGFILE"
done

Make executable and add to crontab:

chmod +x ~/scripts/neuralmind-scheduler.sh
crontab -e

# Add:
0 2 * * * ~/scripts/neuralmind-scheduler.sh

Running on Multiple Projects

Master Configuration File

Create ~/.neuralmind-scheduler.yaml (or %APPDATA%\neuralmind-scheduler.yaml on Windows):

projects:
  - name: video_toolkit
    path: C:\Users\dtfro\claudecode\video_toolkit
    schedule: "0 2 * * *"  # 2 AM daily
    commands:
      - wakeup
      - audit-report
      - query: "How does the cost tracking work?"
  
  - name: neuralmind
    path: C:\Users\dtfro\claudecode\neuralmind
    schedule: "0 3 * * *"  # 3 AM daily
    commands:
      - wakeup
      - audit-report
      - search: "CostTracker"
  
  - name: ibkr-traderbot
    path: C:\Users\dtfro\claudecode\ibkr-traderbot
    schedule: "0 4 * * 0"  # 4 AM on Sundays
    commands:
      - wakeup

logging:
  directory: C:\Users\dtfro\Documents\neuralmind-logs
  retention_days: 30

Then use a script to read this config and schedule tasks (PowerShell pseudocode):

# Read YAML, loop through projects, register tasks
# (Implementation would require a YAML parser)

Instead of manually maintaining a config file, use a master discovery script that automatically finds all projects in a root directory that have been initialized with NeuralMind (those with neuralmind.db/ or .neuralmind/).

PowerShell: C:\scripts\run-neuralmind-all.ps1

# ============================================================
# NeuralMind Master Scheduler - Auto-Discovery
# Finds all initialized projects and runs audit suite
# ============================================================

param(
    [string]$RootPath = "$env:USERPROFILE\claudecode",
    [string]$LogDir = "$env:USERPROFILE\Documents\neuralmind-logs",
    [int]$MaxDegreeOfParallelism = 2
)

# Validate root path
if (!(Test-Path $RootPath)) {
    Write-Error "Root path does not exist: $RootPath"
    exit 1
}

# Ensure log directory exists
if (!(Test-Path $LogDir)) { 
    New-Item -ItemType Directory -Path $LogDir | Out-Null 
}

$masterLogFile = "$LogDir\master_run_$(Get-Date -Format 'yyyy-MM-dd_HHmmss').log"

function Log {
    param([string]$Message)
    $msg = "[$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')] $Message"
    Write-Host $msg
    Add-Content -Path $masterLogFile -Value $msg
}

Log "=== NeuralMind Auto-Discovery Started at $RootPath ==="

# Find all projects with NeuralMind index
$projects = Get-ChildItem -Path $RootPath -Directory | Where-Object {
    (Test-Path (Join-Path $_.FullName "neuralmind.db")) -or
    (Test-Path (Join-Path $_.FullName ".neuralmind"))
} | Select-Object -ExpandProperty FullName

if ($projects.Count -eq 0) {
    Log "No initialized NeuralMind projects found in $RootPath"
    Log "Initialize a project with: neuralmind build ."
    exit 0
}

Log "Found $($projects.Count) initialized project(s)"

# Run audit on each project
foreach ($projectPath in $projects) {
    $projectName = Split-Path $projectPath -Leaf
    $projectLog = "$LogDir\$(Get-Date -Format 'yyyy-MM-dd_HHmmss')_$projectName.log"
    
    Log "Processing: $projectName"
    
    try {
        Push-Location $projectPath
        
        # Run wakeup
        neuralmind wakeup . 2>&1 | Tee-Object -FilePath $projectLog -Append | ForEach-Object { Log $_ }
        
        # Generate audit reports
        $timestamp = Get-Date -Format "yyyy-MM-dd_HHmmss"
        $auditJson = "$LogDir\audit_${projectName}_$timestamp.json"
        $auditMd = "$LogDir\audit_${projectName}_$timestamp.md"
        
        neuralmind audit-report . --format json --output $auditJson 2>&1 | Tee-Object -FilePath $projectLog -Append | ForEach-Object { Log $_ }
        neuralmind audit-report . --format markdown --output $auditMd 2>&1 | Tee-Object -FilePath $projectLog -Append | ForEach-Object { Log $_ }
        
        Log "βœ“ Completed: $projectName"
    } catch {
        Log "βœ— Error on $projectName : $_"
    } finally {
        Pop-Location
    }
}

Log "=== Auto-Discovery Complete ==="
Log "Master log: $masterLogFile"
Log "Individual logs and reports in: $LogDir"

Setup: Register this script to run once daily:

# Run PowerShell as Administrator
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

# Register task - runs daily at 2 AM, discovers all projects automatically
$trigger = New-ScheduledTaskTrigger -Daily -At 2:00am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\scripts\run-neuralmind-all.ps1"
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable -RunOnlyIfNetworkAvailable
Register-ScheduledTask -TaskName "NeuralMind Suite - Auto-Discovery" -Trigger $trigger -Action $action -Settings $settings -RunLevel Highest -Description "Daily NeuralMind audit for all initialized projects"

How it works:

  1. Scans C:\Users\dtfro\claudecode for all subdirectories
  2. Identifies projects that have been initialized with NeuralMind (have neuralmind.db/)
  3. Runs wakeup + audit-report on each project
  4. Logs all output to Documents\neuralmind-logs\
  5. No manual task updates needed β€” new projects are picked up automatically

Bash equivalent for Linux/macOS:

#!/bin/bash
# /home/user/scripts/neuralmind-auto-discovery.sh

ROOT_PATH="${1:-$HOME/projects}"
LOG_DIR="${2:-$HOME/neuralmind-logs}"
mkdir -p "$LOG_DIR"

MASTER_LOG="$LOG_DIR/master_$(date +%Y-%m-%d_%H%M%S).log"

log() {
    msg="[$(date '+%Y-%m-%d %H:%M:%S')] $1"
    echo "$msg" | tee -a "$MASTER_LOG"
}

log "=== NeuralMind Auto-Discovery Started at $ROOT_PATH ==="

projects=()
while IFS= read -r -d '' project_dir; do
    projects+=("$project_dir")
done < <(find "$ROOT_PATH" -maxdepth 1 -type d -exec test -e "{}/.neuralmind" -o -e "{}/neuralmind.db" \; -print0)

if [ ${#projects[@]} -eq 0 ]; then
    log "No initialized NeuralMind projects found in $ROOT_PATH"
    exit 0
fi

log "Found ${#projects[@]} initialized project(s)"

for project_path in "${projects[@]}"; do
    project_name=$(basename "$project_path")
    project_log="$LOG_DIR/$(date +%Y-%m-%d_%H%M%S)_${project_name}.log"
    
    log "Processing: $project_name"
    
    (
        cd "$project_path"
        neuralmind wakeup . >> "$project_log" 2>&1
        timestamp=$(date +%Y-%m-%d_%H%M%S)
        neuralmind audit-report . --format json --output "$LOG_DIR/audit_${project_name}_$timestamp.json" >> "$project_log" 2>&1
        neuralmind audit-report . --format markdown --output "$LOG_DIR/audit_${project_name}_$timestamp.md" >> "$project_log" 2>&1
        log "βœ“ Completed: $project_name"
    ) || log "βœ— Error on $project_name"
done

log "=== Auto-Discovery Complete ==="

Add to crontab:

crontab -e
# Add: 0 2 * * * /home/user/scripts/neuralmind-auto-discovery.sh $HOME/claudecode

Scheduling Cloud Repos + Local Projects

For cloud repositories (GitHub, GitLab, etc.), use a cloud sync script that clones/updates repos before auto-discovery runs:

Daily Schedule:

Cloud Sync Script (Windows)

Save to C:\scripts\sync-and-audit-cloud-repos.ps1:

# ============================================================
# NeuralMind Cloud Repo Sync
# Clones/updates cloud repos before auto-discovery audits them
# ============================================================

param(
    [string]$LocalDir = "$env:USERPROFILE\claudecode",
    [string]$LogDir = "$env:USERPROFILE\Documents\neuralmind-logs"
)

$repos = @(
    @{ url = "https://github.com/yourname/cloud-repo-1.git"; name = "cloud-repo-1" },
    @{ url = "https://github.com/yourname/cloud-repo-2.git"; name = "cloud-repo-2" }
)

if (!(Test-Path $LogDir)) { 
    New-Item -ItemType Directory -Path $LogDir | Out-Null 
}

$logFile = "$LogDir\sync_$(Get-Date -Format 'yyyy-MM-dd_HHmmss').log"

function Log {
    param([string]$Message)
    $msg = "[$(Get-Date -Format 'yyyy-MM-dd HH:mm:ss')] $Message"
    Write-Host $msg
    Add-Content -Path $logFile -Value $msg
}

Log "=== Cloud Repo Sync Started ==="

foreach ($repo in $repos) {
    $repoPath = Join-Path $LocalDir $repo.name
    
    try {
        if (Test-Path $repoPath) {
            Log "Updating $($repo.name)..."
            cd $repoPath
            git pull 2>&1 | ForEach-Object { Log $_ }
        } else {
            Log "Cloning $($repo.name)..."
            cd $LocalDir
            git clone $repo.url 2>&1 | ForEach-Object { Log $_ }
            cd $repoPath
        }
        
        # Build index if needed
        if (!(Test-Path ".neuralmind") -and !(Test-Path "neuralmind.db")) {
            Log "Building NeuralMind index for $($repo.name)..."
            graphify build 2>&1 | ForEach-Object { Log $_ }
            neuralmind build . 2>&1 | ForEach-Object { Log $_ }
        }
        
        Log "βœ“ Ready: $($repo.name)"
    } catch {
        Log "βœ— Error on $($repo.name): $_"
    }
}

Log "=== Sync Complete ==="
Log "Audit will run at 2 AM with auto-discovery"

Register the sync task (in Administrator PowerShell):

$trigger = New-ScheduledTaskTrigger -Daily -At 1:00am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\scripts\sync-and-audit-cloud-repos.ps1"
$settings = New-ScheduledTaskSettingsSet -StartWhenAvailable
Register-ScheduledTask -TaskName "NeuralMind Cloud Sync" -Trigger $trigger -Action $action -Settings $settings -RunLevel Highest

To add more cloud repos, edit the $repos array in the script:

$repos = @(
    @{ url = "https://github.com/yourname/cloud-repo-1.git"; name = "cloud-repo-1" },
    @{ url = "https://github.com/yourname/cloud-repo-2.git"; name = "cloud-repo-2" },
    @{ url = "https://github.com/yourorg/another-repo.git"; name = "another-repo" }
)

Examples

Schedule for Single Project

Video_toolkit, Windows, daily at 2 AM:

# Save this as C:\scripts\video_toolkit_audit.ps1
$projectPath = "C:\Users\dtfro\claudecode\video_toolkit"
cd $projectPath
neuralmind wakeup . 
neuralmind audit-report . --format json --output "$env:USERPROFILE\Documents\neuralmind-audit-$(Get-Date -Format 'yyyyMMdd').json"

Register:

$trigger = New-ScheduledTaskTrigger -Daily -At 2am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-File C:\scripts\video_toolkit_audit.ps1"
Register-ScheduledTask -TaskName "NeuralMind - video_toolkit" -Trigger $trigger -Action $action -RunLevel Highest

Schedule for Multiple Projects

All projects, Windows, staggered times:

# video_toolkit at 2 AM
$trigger = New-ScheduledTaskTrigger -Daily -At 2:00am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\scripts\run-neuralmind.ps1 -ProjectPath 'C:\Users\dtfro\claudecode\video_toolkit'"
Register-ScheduledTask -TaskName "NeuralMind - video_toolkit" -Trigger $trigger -Action $action -RunLevel Highest

# neuralmind at 3 AM
$trigger = New-ScheduledTaskTrigger -Daily -At 3:00am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\scripts\run-neuralmind.ps1 -ProjectPath 'C:\Users\dtfro\claudecode\neuralmind'"
Register-ScheduledTask -TaskName "NeuralMind - neuralmind" -Trigger $trigger -Action $action -RunLevel Highest

# ibkr-traderbot at 4 AM
$trigger = New-ScheduledTaskTrigger -Daily -At 4:00am
$action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-NoProfile -ExecutionPolicy Bypass -File C:\scripts\run-neuralmind.ps1 -ProjectPath 'C:\Users\dtfro\claudecode\ibkr-traderbot'"
Register-ScheduledTask -TaskName "NeuralMind - ibkr-traderbot" -Trigger $trigger -Action $action -RunLevel Highest

Monitoring & Logs

Log Locations

Windows:

%USERPROFILE%\Documents\neuralmind-logs\

Linux/macOS:

~/neuralmind-logs/

Viewing Logs

Windows PowerShell:

# See all recent runs
Get-ChildItem $env:USERPROFILE\Documents\neuralmind-logs | Sort-Object LastWriteTime -Descending | Select-Object -First 10

# Tail a log (streaming)
Get-Content -Path "$env:USERPROFILE\Documents\neuralmind-logs\latest.log" -Wait

Linux/macOS:

# See all recent runs
ls -lt ~/neuralmind-logs | head

# Tail a log
tail -f ~/neuralmind-logs/latest.log

Setting Up Log Rotation

Windows PowerShell (add to script):

$logDir = "$env:USERPROFILE\Documents\neuralmind-logs"
$cutoffDate = (Get-Date).AddDays(-30)
Get-ChildItem $logDir | Where-Object { $_.LastWriteTime -lt $cutoffDate } | Remove-Item

Linux (crontab):

# Delete logs older than 30 days, weekly
0 0 * * 0 find ~/neuralmind-logs -mtime +30 -delete

Next Steps

  1. Choose your platform (Windows Task Scheduler, GitHub Actions, or Cron)
  2. Set up the script for your project path(s)
  3. Test manually before scheduling
  4. Monitor logs and adjust schedule as needed
  5. For compliance: store audit reports in a permanent location

See Integration Guide for MCP and CI/CD details.