Skip to content

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

feat(cron): run scheduled jobs through the host agent

Steven Enamakel214a26167820
diff --git a/crates/openhuman-core/src/cron/scheduler.rs b/crates/openhuman-core/src/cron/scheduler.rs
index 9a57a041ae..514e947911 100644
--- a/crates/openhuman-core/src/cron/scheduler.rs
+++ b/crates/openhuman-core/src/cron/scheduler.rs
@@ -38,7 +38,7 @@ use run_record::*;
use shell_job::*;
pub use delivery::deliver_job;
-pub(crate) use host::{is_run_active, try_acquire_run, JobDispatcher};
+pub(crate) use host::{try_acquire_run, JobDispatcher};
use crate::config::Config;
use crate::core::bus::BUS;
diff --git a/crates/openhuman-core/src/cron/scheduler/agent_run.rs b/crates/openhuman-core/src/cron/scheduler/agent_run.rs
index fc5c1707af..3951422b5d 100644
--- a/crates/openhuman-core/src/cron/scheduler/agent_run.rs
+++ b/crates/openhuman-core/src/cron/scheduler/agent_run.rs
@@ -6,8 +6,6 @@ use super::failure_classification::classify_agent_anyhow_for_user;
use super::origin_context::build_run_prompt;
use crate::agent::OpenHumanSessionHost;
use crate::config::Config;
-use crate::core::bus::BUS;
-use crate::core::events::DomainEvent;
use {tinyflows_schedule::types::CronJob, tinyflows_schedule::types::SessionTarget};
/// Recency window the morning briefing installs around its turn so Composio
diff --git a/crates/openhuman-core/src/cron/scheduler/host.rs b/crates/openhuman-core/src/cron/scheduler/host.rs
index 275a7bcef7..bb19353c4c 100644
--- a/crates/openhuman-core/src/cron/scheduler/host.rs
+++ b/crates/openhuman-core/src/cron/scheduler/host.rs
@@ -192,11 +192,6 @@ pub(crate) fn try_acquire_run(job_id: &str) -> Option<RunClaim> {
RunClaim::acquire(CLAIM_SCOPE, job_id)
}
-/// Whether a scheduled or manual run of `job_id` is in flight.
-pub(crate) fn is_run_active(job_id: &str) -> bool {
- RunClaim::is_running(CLAIM_SCOPE, job_id)
-}
-
/// One scope's scheduler: polls its store, dispatches under its context and
/// owns the tasks it started (dropping it aborts them).
pub(crate) struct JobDispatcher {