ForcePilot/backend/package/yuxi/channel/cron/__init__.py
Kris 0dcc370819 feat(cron): 实现完整的定时任务调度模块
新增了从调度引擎、任务注册、状态追踪到结果投递的全套cron任务系统,支持cron表达式、一次性任务和周期任务,包含失败告警、任务持久化和运行日志功能
2026-05-21 10:24:54 +08:00

48 lines
1.1 KiB
Python

from yuxi.channel.cron.engine import CronEngine, get_cron_engine
from yuxi.channel.cron.handler_registry import (
list_registered,
register_handler,
resolve_handler,
)
from yuxi.channel.cron.normalize import normalize_job
from yuxi.channel.cron.phase_tracker import PhaseTracker, create_run_id
from yuxi.channel.cron.types import (
CronAgentExecutionPhase,
CronDeliveryReceipt,
CronDeliveryTarget,
CronFailureAlert,
CronJob,
CronJobState,
CronJobStatus,
CronPhaseRecord,
CronRunDiagnostic,
CronRunOutcome,
CronRunStatus,
DeliveryHandler,
ScheduleKind,
)
__all__ = [
"CronAgentExecutionPhase",
"CronDeliveryReceipt",
"CronDeliveryTarget",
"CronEngine",
"CronFailureAlert",
"CronJob",
"CronJobState",
"CronJobStatus",
"CronPhaseRecord",
"CronRunDiagnostic",
"CronRunOutcome",
"CronRunStatus",
"DeliveryHandler",
"PhaseTracker",
"ScheduleKind",
"create_run_id",
"get_cron_engine",
"list_registered",
"normalize_job",
"register_handler",
"resolve_handler",
]