mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
Rewrite all import statements, patch() targets, sys.modules keys, importlib.import_module() strings, and subprocess -m references to use hermes_agent.* paths. Strip sys.path.insert hacks from production code (rely on editable install). Update COMPONENT_PREFIXES for logger filtering. Fix 3 hardcoded getLogger() calls to use __name__. Update transport and tool registry discovery paths. Update plugin module path strings. Add legacy process-name patterns for gateway PID detection. Add main() to skills_sync for console_script entry point. Fix _get_bundled_dir() path traversal after move. Part of #14182, #14183
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
"""
|
|
Cron job scheduling system for Hermes Agent.
|
|
|
|
This module provides scheduled task execution, allowing the agent to:
|
|
- Run automated tasks on schedules (cron expressions, intervals, one-shot)
|
|
- Self-schedule reminders and follow-up tasks
|
|
- Execute tasks in isolated sessions (no prior context)
|
|
|
|
Cron jobs are executed automatically by the gateway daemon:
|
|
hermes gateway install # Install as a user service
|
|
sudo hermes gateway install --system # Linux servers: boot-time system service
|
|
hermes gateway # Or run in foreground
|
|
|
|
The gateway ticks the scheduler every 60 seconds. A file lock prevents
|
|
duplicate execution if multiple processes overlap.
|
|
"""
|
|
|
|
from hermes_agent.cron.jobs import (
|
|
create_job,
|
|
get_job,
|
|
list_jobs,
|
|
remove_job,
|
|
update_job,
|
|
pause_job,
|
|
resume_job,
|
|
trigger_job,
|
|
JOBS_FILE,
|
|
)
|
|
from hermes_agent.cron.scheduler import tick
|
|
|
|
__all__ = [
|
|
"create_job",
|
|
"get_job",
|
|
"list_jobs",
|
|
"remove_job",
|
|
"update_job",
|
|
"pause_job",
|
|
"resume_job",
|
|
"trigger_job",
|
|
"tick",
|
|
"JOBS_FILE",
|
|
]
|