Skip to content

Built-in Tasks

PRX includes several built-in cron tasks that handle routine maintenance. These tasks run automatically when the cron system is enabled.

Task Reference

TaskDefault ScheduleDescription
heartbeatEvery 30sSystem health check
memory-hygieneDaily at 3:00Compact and prune memory entries
log-rotationDaily at 0:00Rotate and compress old log files
cache-cleanupHourlyRemove expired cache entries
metrics-exportEvery 5mExport metrics to configured backends
signature-updateEvery 6hUpdate threat signatures (if PRX-SD integration enabled)

Configuration

Each built-in task can be individually enabled/disabled and rescheduled:

toml
[cron.builtin.memory_hygiene]
enabled = true
schedule = "0 3 * * *"

[cron.builtin.log_rotation]
enabled = true
schedule = "0 0 * * *"
max_log_age_days = 30

[cron.builtin.cache_cleanup]
enabled = true
schedule = "0 * * * *"

Custom Tasks

In addition to built-in tasks, you can define custom agent tasks that execute a prompt on a schedule:

toml
[[cron.tasks]]
name = "weekly-cleanup"
schedule = "0 2 * * 0"  # Sundays at 2:00 AM
action = "agent"
prompt = "Review and archive old conversation logs"
timeout_secs = 300

Released under the Apache-2.0 License.