Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(cron): add job builder for cron scheduling

Steven Enamakelf2dc2c1b2b8e
diff --git a/crates/openhuman-core/src/cron/job_builder.rs b/crates/openhuman-core/src/cron/job_builder.rs
index 6b1f8916b5..3298c77ffa 100644
--- a/crates/openhuman-core/src/cron/job_builder.rs
+++ b/crates/openhuman-core/src/cron/job_builder.rs
@@ -171,6 +171,9 @@ pub fn create_agent_job(
input: AgentJobInput,
origin: Option<JobOrigin>,
) -> Result<CronJob, String> {
+ if cron::limits::enforced(config) && origin.is_none() {
+ return Err("cron jobs can only be created from a conversation".to_string());
+ }
let session_target = input.session_target.unwrap_or(if origin.is_some() {
SessionTarget::Current
} else {