- Removed legacy cron daemon functionality, integrating cron job execution directly into the gateway process for improved efficiency. - Updated CLI commands to reflect changes, replacing `hermes cron daemon` with `hermes cron status` and enhancing documentation for cron job management. - Clarified messaging in the README and other documentation regarding the gateway's role in managing cron jobs. - Removed obsolete terminal_hecate tool and related configurations to simplify the codebase.
36 lines
891 B
Python
36 lines
891 B
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 system service (recommended)
|
|
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 cron.jobs import (
|
|
create_job,
|
|
get_job,
|
|
list_jobs,
|
|
remove_job,
|
|
update_job,
|
|
JOBS_FILE,
|
|
)
|
|
from cron.scheduler import tick
|
|
|
|
__all__ = [
|
|
"create_job",
|
|
"get_job",
|
|
"list_jobs",
|
|
"remove_job",
|
|
"update_job",
|
|
"tick",
|
|
"JOBS_FILE",
|
|
]
|