Skip to main content

Scheduler

WASP runs continuously even when no one is asking it questions. This page lists every scheduled job and explains what triggers autonomous behavior.

Three scheduling primitives

NOT interchangeable.

ConceptOwnerGranularityPersistenceUse case
Remindersreminders skillseconds-minutesreminders tableOne-shot or daily/weekly alerts; can trigger sub-agents
Tasks (recurring custom)task_manager skillinterval (seconds), no fixed clock timeRedis hash custom_tasks"Every N hours run this instruction"
GoalsGoalOrchestratorTaskGraph (≤ 8 steps)goals table + RedisMulti-step plans with replanning

The scheduler's jobs are different from the operator-facing primitives. Jobs are internal periodic functions that keep WASP itself running.

Registered jobs (41 total)

All 41 jobs below are registered in src/main.py at startup. Their default cadence and feature-flag gating is listed; toggle the flag on /config to disable.

Always-on infrastructure

JobDefault intervalWhat it does
health_check60 sLiveness probe; updates agent:health
db_maintenanceweeklyVACUUM ANALYZE via AUTOCOMMIT (no table locking)
audit_retention6 hBounded batch deletion of audit_log rows older than AUDIT_RETENTION_DAYS (default 30)
memory_cleanupdailyDrops episodic entries below the importance floor
snapshotdailySerializes memory state into MemorySnapshot and writes to /data/backups/

Memory + learning maintenance

JobDefault intervalWhat it does
vector_index600 sBackfills missing embeddings for MemoryEmbedding rows
promotion12 hPromotes recurring/important episodic entries to semantic memory
kg_prunerdailyPrunes low-confidence / orphaned KG nodes
kg_insights_updaterhourlyRefreshes derived KG insights
learning_prunerdailyDrops stale LearningExample rows below use-count threshold
behavioral_prunerdailyDrops behavioral rules with zero applications after N days
procedural_prunerdailyDrops procedural memory entries below success threshold
execution_reflection_prunerdailyDrops execution_reflection rows past retention

Operator-facing primitives

JobDefault intervalWhat it does
reminder_checker30 sScans reminders for due rows; fires them; agent-linked reminders restart the agent's goal cycle
monitor_checker5 minPolls website monitors created via monitors skill
subscription_checker5 minRSS feeds + price alerts created via subscribe skill
custom_task_runner60 sIterates custom_tasks Redis hash; dispatches due tasks
checkinhourlyOptional proactive check-in to the operator (skipped if no episodic memory exists yet — fresh-install guard)
digestconfigurablePeriodic digest (daily/weekly summary)

Goals + agents

JobDefault intervalWhat it does
goal_tick15 sExecutes up to 3 consecutive steps per ACTIVE goal (priority desc)
agent_tick15 sCleanup pass for sub-agents (state transitions, archived goals)
goal_meta_reflectionconfigurablePer-goal post-mortem at completion or failure

Cognitive systems

JobDefault intervalWhat it does
reflectionhourlySynthesizes recent episodic memory into higher-level summaries
dream1 h (gated)Activates when operator inactive ≥ 2 h AND (night 1–7 am OR ≥ 4 h idle); max once per 6 h
autonomous30 minAutonomous Goal Generator
proactiveconfigurableSuggests actions based on recent state
perception15 minBackground crypto/web perception for assets tracked in the KG
opportunity_enginehourlyDetects automation opportunities from episodic patterns
opportunities_processorhourlyProcesses ranked opportunities into goal candidates
cpi_monitor5 minComputes Cognitive Pressure Index; sets agent:cpi_high when > 80
self_integrity6 hCross-checks self-model strengths vs actual skill rates
behavioral_learner120 sDrains behavioral:pending queue; LLM extracts rules; saves to behavioral_rules
world_modelhourlyUpdates EntityState snapshots from recent WorldTimeline rows
skill_evolution6 hIdentifies recurring SkillPattern rows and synthesizes composite skills
capability_evolutionhourlyDiscovers and registers new capabilities from successful execution traces
capability_learnerhourlyUpdates capability confidence scores from recent outcomes
execution_intelligence_monitorhourlyTracks LLM call efficiency; flags expensive patterns
execution_knowledge_synchourlySyncs execution-derived knowledge into the KG

Resource hygiene

JobDefault intervalWhat it does
browser_session_cleanup300 sIdle Reaper for Chromium sessions (CPU: ~81% → ~0.25% when idle)
disk_monitorhourlyWatches /data/ free space; warns when low
screenshot_cleanupdailyRemoves screenshots older than 30 days

CPI gating

When agent:cpi_high is set (CPI > 80), the heavy background jobs (autonomous, dream, perception, opportunity_engine, proactive) check the flag and skip for the cycle. This prevents background work from amplifying load during pressure.

See Monitoring → CPI for details.

Catch-up on restart

When agent-core restarts, the scheduler reads last_run_at from Redis for each job and immediately fires anything that should have run while the container was down (with a ceiling of one make-up fire per job). PEL zombie recovery (XAUTOCLAIM at startup) reclaims any pending Redis Streams entries that were in-flight at crash time.

Reminders

Operator creates: "remind me to back up the disk in 3 hours".

Stored fields:

  • due_at — absolute UTC timestamp, or relative offset
  • recurringnull, daily, weekly, monthly
  • agent_id — optional sub-agent to restart when fired
  • agent_objective — text to seed the agent's goal cycle

ReminderCheckerJob (30 s) polls due reminders. Agent-linked reminders call agent_orchestrator.create_agent_goal(). A 🤖 Telegram notification is sent at fire time.

delete_reminder accepts keyword="all" or any substring of the reminder text.

Custom recurring tasks

Operator creates: "every 6 hours, fetch BTC price and email me a report".

Behavior:

  • Stored as custom_tasks Redis hash entries.
  • interval_seconds is the only schedule primitive.
  • next_run_at = created_at + interval (NOT now).
  • custom_task_runner (60 s) dispatches due tasks as a system-prefixed message.

Limitation: no fixed clock times

task_manager does NOT support clock-time scheduling or daypart phrases. When the user requests one ("every Monday at 9am"), the agent creates an interval-only task and the response includes an automatic disclaimer (see Skill Safety → Schedule Honesty).

To approximate "every Monday at 9am":

  1. Create the task at 9am on a Monday.
  2. Set interval=604800 (one week).

The task runs every 7 days from creation. Drift can occur if the host loses time.

Operator commands

ActionHow
List recurring tasksTelegram: "list my tasks" (auto-detected fast path); or dashboard /scheduler
Delete a taskTelegram: "delete the X task"; or per-row delete in /scheduler
Pause a jobToggle the relevant feature flag in /config
Inspect job stateRedis: GET agent:autonomous_state, GET agent:dream_state, GET agent:integrity_report

See also