Skip to main content

Module cron

Module cron 

Modules§

scheduler

Structs§

CronJob
CronJobPatch
CronRun
DeliveryConfig

Enums§

JobType
Schedule
SessionTarget

Functions§

add_agent_job
add_job
add_once
add_once_at
add_once_at_validated
Create a one-shot validated shell job at an absolute timestamp.
add_once_validated
Create a one-shot validated shell job from a delay string (e.g. “30m”).
add_shell_job
add_shell_job_with_approval
all_overdue_jobs
claim_job
clear_stale_locks
deserialize_maybe_stringified
due_jobs
get_job
list_jobs
list_jobs_by_agent
Cron jobs owned by agent_alias, for the agent-deletion export-then-delete archive
list_runs
next_run_for_schedule
normalize_expression
parse_delay
pause_job
record_last_run
record_last_run_with_status
record_run
release_job
remove_job
remove_jobs_by_agent
Delete every cron job owned by agent_alias, returning the row count (cron_runs cascade via their job_id FK). A job whose owning agent is gone can never run, so the agent-deletion cascade removes it
rename_jobs_by_agent
Re-point every cron job owned by from to to, returning the row count. Called by the agent-rename cascade the job keeps running, just under the renamed owner. agent_alias is plain TEXT (not a UUID), so this is a direct column update.
reschedule_after_run
reschedule_after_run_with_status
resolve_job_id_or_name
resume_job
schedule_cron_expression
skip_missed_run
sync_declarative_jobs
update_job
update_shell_job_with_approval
Update a shell job’s command with security validation. Validates the new command (if changed) against the named agent’s risk profile before persisting.
validate_delivery_config
validate_schedule
validate_shell_command
Validate a shell command against an agent’s security policy (allowlist + risk gate). agent_alias names the agent under whose risk profile the command will run. Returns Ok(()) if the command passes all checks, or an error describing why it was blocked.
validate_shell_command_with_security
Validate a shell command using an existing SecurityPolicy instance. Preferred when the caller already holds a SecurityPolicy (e.g. scheduler).