> For the complete documentation index, see [llms.txt](https://docs.talus.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.talus.network/reference/sdk/actions-scheduler.md).

# Scheduler Actions

**Audience:** Nexus SDK integrators (Rust).

**Area:** Scheduler Actions.

**Generated from:** Nexus SDK public API at release `v2.1.1` commit `08bfe76e726922ce512d623fbc1d2e1bd786bcd4` (generated inventory preserved below).

{% hint style="warning" %}
**Before submitting a scheduler transaction:** Verify the selected SDK, deployment package IDs, RuntimeAuthority root, and transaction effects before treating occurrence-settlement or Invocation timeout/refund signatures as runnable.
{% endhint %}

The scheduling model is `Task -> Occurrence -> Execution`. A Task records the operation, inputs, funding, per-occurrence budget, failure policy, immutable controller, Schedule, and durable occurrence history. An occurrence becomes an Execution only after dispatch. The `scheduler` facade is reached through `NexusClient::scheduler`; it creates Tasks and returns stateful handles for later mutation and observation.

#### Protected Task authorization availability

The Move contract accepts `authorization_bindings: VecMap<Vertex, ID>` in `nexus_interface::agent::new_agent_execution_config` and materializes entries into Task-bound `AgentSkillAuthorization` grants before recurring scheduling. SDK exposes the map as `AuthorizationBindings` and accepts it in `TaskOperation::agent_skill`; the high-level CLI leaves the map empty only when no bindings are supplied, and 2.1.1 accepts repeatable `--authorization-binding VERTEX=OBJECT_ID` values with `--agent-id` and `--skill-id`. Bind every protected vertex and verify the recipient object before signing.

The nearest readback remains `TaskMutationReceipt::task_id`, followed by `client.scheduler().task(task_id).snapshot().await?` and `.occurrences(None, limit).await?`. The Move authorization module exposes grant-count and grant-copy functions, but the SDK has no public decoder for the Task’s dynamic `AgentSkillAuthorization` child; use a Move-aware raw-object/effects decoder for the reusable grant vector, and do not infer grants from Task/Occurrence counts.

Timeout abort, Invocation refund, and occurrence settlement are separate transitions. `OccurrenceHandle::resolve_expired` composes eligible recovery and settles a finished occurrence, returning confirmed resolutions and its final observed snapshot. The specific `abort_expired(Some(id))` path may leave the occurrence unsettled; use `OccurrenceHandle::settle` when needed and verify `Settled`/zero-in-flight state before Task close. `cost().outstanding_invocation_ids()` exposes unresolved locks. For reusable input preparation and remote uploads, use `TaskInputPlan` and preflight against the published DAG before materializing storage; see [Walrus storage](/reference/sdk/walrus.md).

Priority is a percentage of the base gas budget. `Occurrence::with_priority_fee_percentage` accepts the inclusive protocol range, while `Occurrence::{now,at_ms,after_ms}` use the default `20`. The API has no `priority_fee_per_gas_unit` field.

**`sdk/src/nexus/scheduler/mod.rs`**

**`sdk/src/nexus/scheduler/task.rs`**

**`sdk/src/nexus/scheduler/occurrence.rs`**

### Source-derived public API inventory

#### `re-export pub, use, occurrence, OccurrenceHandle, task, TaskHandle`

```rust
pub use {occurrence::OccurrenceHandle, task::TaskHandle};
```

#### `Scheduler`

```rust
pub struct Scheduler {
    pub(super) client: NexusClient,
}
```

#### `Scheduler::preflight_task_inputs`

```rust
pub async fn preflight_task_inputs(
        &self,
        scheduler_package: sui::types::Address,
        task: &TaskSpec,
    ) -> Result<(), SchedulerError> {
```

#### `Scheduler::create_task`

```rust
pub async fn create_task(
        &self,
        scheduler_package: sui::types::Address,
        task: TaskSpec,
    ) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `Scheduler::schedule_task`

```rust
pub async fn schedule_task(
        &self,
        scheduler_package: sui::types::Address,
        task: TaskSpec,
        schedule: Schedule,
    ) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `Scheduler::task`

```rust
pub fn task(&self, task_id: sui::types::Address) -> TaskHandle {
```

#### `Scheduler::task_pointers`

```rust
pub async fn task_pointers(
        &self,
        scheduler_package: sui::types::Address,
        cursor: Option<Vec<u8>>,
        limit: usize,
    ) -> Result<TaskPointerPage, SchedulerError> {
```

#### `OccurrenceHandle`

```rust
pub struct OccurrenceHandle {
    client: NexusClient,
    reference: OccurrenceRef,
}
```

#### `OccurrenceHandle::reference`

```rust
pub const fn reference(&self) -> OccurrenceRef {
```

#### `OccurrenceHandle::snapshot`

```rust
pub async fn snapshot(&self) -> Result<OccurrenceSnapshot, SchedulerError> {
```

#### `OccurrenceHandle::watch`

```rust
pub async fn watch(&self, options: WatchOptions) -> Result<OccurrenceSnapshot, SchedulerError> {
```

#### `OccurrenceHandle::watch_until`

```rust
pub async fn watch_until<F>(
        &self,
        options: WatchOptions,
        mut stop: F,
    ) -> Result<OccurrenceSnapshot, SchedulerError>
    where
        F: FnMut(&OccurrenceSnapshot) -> bool,
    {
```

#### `OccurrenceHandle::expire`

```rust
pub async fn expire(&self) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `OccurrenceHandle::settle`

```rust
pub async fn settle(&self) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `OccurrenceHandle::cost`

```rust
pub async fn cost(&self) -> Result<OccurrenceCost, SchedulerError> {
```

#### `OccurrenceHandle::resolve_expired`

```rust
pub async fn resolve_expired(
        &self,
    ) -> Result<crate::scheduler::RecoveryReceipt, SchedulerError> {
```

#### `OccurrenceHandle::abort_expired`

```rust
pub async fn abort_expired(
        &self,
        invocation_id: Option<sui::types::Address>,
    ) -> Result<AbortReceipt, SchedulerError> {
```

#### `TaskHandle`

```rust
pub struct TaskHandle {
    client: NexusClient,
    task_id: sui::types::Address,
}
```

#### `TaskHandle::id`

```rust
pub const fn id(&self) -> sui::types::Address {
```

#### `TaskHandle::occurrence`

```rust
pub fn occurrence(&self, occurrence_id: u64) -> super::OccurrenceHandle {
```

#### `TaskHandle::snapshot`

```rust
pub async fn snapshot(&self) -> Result<TaskSnapshot, SchedulerError> {
```

#### `TaskHandle::occurrences`

```rust
pub async fn occurrences(
        &self,
        cursor: Option<Vec<u8>>,
        limit: usize,
    ) -> Result<OccurrencePage, SchedulerError> {
```

#### `TaskHandle::add_occurrence`

```rust
pub async fn add_occurrence(
        &self,
        occurrence: Occurrence,
    ) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `TaskHandle::set_recurrence`

```rust
pub async fn set_recurrence(
        &self,
        recurrence: Recurrence,
    ) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `TaskHandle::clear_recurrence`

```rust
pub async fn clear_recurrence(&self) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `TaskHandle::pause`

```rust
pub async fn pause(&self) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `TaskHandle::resume`

```rust
pub async fn resume(&self) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `TaskHandle::cancel`

```rust
pub async fn cancel(&self) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `TaskHandle::refill`

```rust
pub async fn refill(&self, amount_mist: u64) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `TaskHandle::close`

```rust
pub async fn close(&self) -> Result<TaskMutationReceipt, SchedulerError> {
```

#### `ErrorSource`

```rust
pub type ErrorSource = Box<dyn Error + Send + Sync + 'static>;
```

#### `ScheduleError`

```rust
pub enum ScheduleError {
    /// A Task cannot reserve zero MIST for an occurrence.
    #[error("occurrence budget must be greater than zero")]
    ZeroOccurrenceBudget,

    /// A Task entry group cannot be empty.
    #[error("entry group must not be empty")]
    EmptyEntryGroup,

    /// An absolute deadline precedes the known absolute start.
    #[error("occurrence deadline {deadline_ms}ms precedes its start {start_time_ms}ms")]
    DeadlineBeforeStart {
        /// Known absolute start timestamp.
        start_time_ms: u64,
        /// Invalid absolute deadline timestamp.
        deadline_ms: u64,
    },

    /// The priority fee is outside the protocol range.
    #[error("priority fee percentage must be in {minimum}..={maximum}, got {percentage}")]
    PriorityFeeOutOfRange {
        /// Invalid percentage.
        percentage: u64,
        /// Inclusive protocol minimum.
        minimum: u64,
        /// Inclusive protocol maximum.
        maximum: u64,
    },

    /// A recurrence interval must advance time.
    #[error("recurrence interval must be greater than zero")]
    ZeroRecurrenceInterval,

    /// A finite recurrence must contain at least one occurrence.
    #[error("finite recurrence occurrence count must be greater than zero")]
    ZeroRecurrenceCount,

    /// The atomic create and schedule shortcut requires work.
    #[error("schedule must contain at least one occurrence or a recurrence")]
    EmptySchedule,

    /// Resolving a relative timestamp exceeded the `u64` timestamp range.
    #[error("resolving {field} from {base_ms}ms with offset {offset_ms}ms overflowed")]
    TimeOverflow {
        /// Name of the timestamp being resolved.
        field: &'static str,
        /// Timestamp to which the offset was applied.
        base_ms: u64,
        /// Relative offset that overflowed.
        offset_ms: u64,
    },

    /// A Task operation and funding controller cannot be combined.
    #[error("{message}")]
    IncompatibleFunding {
        /// Explanation of the invalid combination.
        message: &'static str,
    },
}
```

#### `SchedulerError`

```rust
pub enum SchedulerError {
    /// A Task or Schedule authoring value is invalid.
    #[error(transparent)]
    Schedule(#[from] ScheduleError),

    /// The configured Nexus client could not complete the operation.
    #[cfg(feature = "nexus")]
    #[error(transparent)]
    Client(Box<NexusError>),

    /// The requested Task object does not exist.
    #[error("Task '{task_id}' was not found")]
    TaskNotFound {
        /// Missing Task identifier.
        task_id: sui::types::Address,
    },

    /// The requested occurrence record does not exist.
    #[error("occurrence {occurrence_id} was not found on Task '{task_id}'")]
    OccurrenceNotFound {
        /// Owning Task identifier.
        task_id: sui::types::Address,
        /// Missing occurrence identifier.
        occurrence_id: u64,
    },

    /// The requested operation requires a dispatched occurrence.
    #[error("occurrence {occurrence_id} on Task '{task_id}' has not been dispatched")]
    OccurrenceNotDispatched {
        /// Owning Task identifier.
        task_id: sui::types::Address,
        /// Occurrence identifier.
        occurrence_id: u64,
    },

    /// Settlement was requested from a lifecycle state other than `Finished`.
    #[error(
        "occurrence {occurrence_id} on Task '{task_id}' is not ready for settlement; expected \
         finished, observed {observed:?}"
    )]
    OccurrenceNotReadyForSettlement {
        /// Owning Task identifier.
        task_id: sui::types::Address,
        /// Occurrence identifier.
        occurrence_id: u64,
        /// Lifecycle state observed immediately before transaction construction.
        observed: OccurrenceStatus,
    },

    /// A selected DAG does not contain the requested Task entry group.
    #[error(
        "DAG '{dag_id}' does not contain Task entry group '{entry_group}'; available groups: \
         {available:?}"
    )]
    TaskEntryGroupNotFound {
        /// Selected DAG identifier.
        dag_id: sui::types::Address,
        /// Requested entry group.
        entry_group: String,
        /// Entry groups published by the DAG.
        available: Vec<String>,
    },

    /// Task inputs do not exactly match the selected DAG entry group.
    #[error(
        "Task inputs do not match entry group '{entry_group}' on DAG '{dag_id}'; expected shape \
         {expected}, received shape {received}"
    )]
    TaskInputsMismatch {
        /// Selected DAG identifier.
        dag_id: sui::types::Address,
        /// Selected entry group.
        entry_group: String,
        /// Required input JSON shape with placeholder values.
        expected: String,
        /// Supplied input JSON shape without user values.
        received: String,
    },

    /// One provided Task input does not conform to the immutable Tool schema stored on its DAG vertex.
    #[error(
        "Task input '{vertex}.{port}' on DAG '{dag_id}' does not conform to MetaSchema; expected \
         {expected}, received {received}"
    )]
    TaskInputSchemaMismatch {
        /// Effective DAG identifier.
        dag_id: sui::types::Address,
        /// Entry vertex name.
        vertex: String,
        /// Entry input port name.
        port: String,
        /// Required cardinality and value kind.
        expected: Box<str>,
        /// Received cardinality and value kind.
        received: Box<str>,
    },

    /// A pinned Agent skill forbids a caller-selected DAG, even when it repeats the pinned ID.
    #[error(
        "Agent '{agent_id}' skill {skill_id} is pinned to DAG '{pinned_dag}' and rejects caller-selected DAG '{selected_dag}'"
    )]
    PinnedSkillDagSelectionConflict {
        /// Selected Agent.
        agent_id: sui::types::Address,
        /// Selected Agent-local skill.
        skill_id: u64,
        /// Authoritative registered DAG.
        pinned_dag: sui::types::Address,
        /// Rejected caller-selected DAG.
        selected_dag: sui::types::Address,
    },

    /// A runtime-selected Agent skill requires the Task author to choose a DAG.
    #[error("Agent '{agent_id}' skill {skill_id} requires a caller-selected DAG")]
    RuntimeSelectedSkillDagRequired {
        /// Selected Agent.
        agent_id: sui::types::Address,
        /// Selected Agent-local skill.
        skill_id: u64,
    },

    /// The configured signer cannot satisfy the Task controller.
    #[error("authority for Task '{task_id}' is unavailable: {message}")]
    AuthorityUnavailable {
        /// Task whose controller cannot be resolved.
        task_id: sui::types::Address,
        /// Human readable authority mismatch.
        message: String,
    },

    /// An onchain object did not have the required type or shape.
    #[error("object '{object_id}' is invalid: {message}")]
    InvalidObject {
        /// Invalid object identifier.
        object_id: sui::types::Address,
        /// Human readable schema mismatch.
        message: String,
    },

    /// Binary Canonical Serialization failed at the Move boundary.
    #[error("scheduler BCS conversion failed")]
    Bcs(#[source] bcs::Error),

    /// RPC or network transport failed.
    #[error("scheduler transport failed: {source}")]
    Transport {
        /// Original transport failure.
        #[source]
        source: ErrorSource,
    },

    /// Programmable transaction construction failed.
    #[error("scheduler transaction construction failed: {source}")]
    Transaction {
        /// Original construction failure.
        #[source]
        source: ErrorSource,
    },

    /// A submitted transaction was not confirmed as expected.
    #[error("scheduler transaction confirmation failed: {message}")]
    Confirmation {
        /// Confirmation failure details.
        message: String,
    },

    /// Confirmed chain data violates the scheduler's structural invariants.
    #[error("inconsistent scheduler chain state: {message}")]
    InconsistentChainState {
        /// Invariant violation details.
        message: String,
    },

    /// A scheduler query option is invalid.
    #[error("invalid scheduler request: {message}")]
    InvalidRequest {
        /// Invalid request details.
        message: String,
    },

    /// Watching an occurrence reached its timeout.
    #[error("timed out while waiting for occurrence lifecycle completion")]
    WatchTimedOut {
        /// Last object backed snapshot observed before timeout.
        last_snapshot: Box<OccurrenceSnapshot>,
    },
}
```

#### `TaskInputPlan`

```rust
pub struct TaskInputPlan {
    prepared: TaskInputs,
    uploads: BTreeMap<String, WalrusUploadData>,
}
```

#### `TaskInputPlan::new`

```rust
pub fn new(input: &Value, remote: &[String]) -> AnyResult<Self> {
```

#### `TaskInputPlan::preflight_inputs`

```rust
pub fn preflight_inputs(&self) -> TaskInputs {
```

#### `TaskInputPlan::has_uploads`

```rust
pub fn has_uploads(&self) -> bool {
```

#### `TaskInputPlan::has_references`

```rust
pub fn has_references(&self) -> bool {
```

#### `TaskInputPlan::verify_references`

```rust
pub async fn verify_references(&self, reader: &crate::walrus::WalrusReader) -> AnyResult<()> {
```

#### `TaskInputPlan::materialize_with`

```rust
pub async fn materialize_with<F, Fut>(mut self, mut upload: F) -> AnyResult<TaskInputs>
    where
        F: FnMut(String, WalrusUploadData) -> Fut,
        Fut: std::future::Future<Output = AnyResult<NexusData>>,
    {
```

#### `re-export pub, use, receipt, RecoveryReceipt`

```rust
pub use receipt::RecoveryReceipt;
```

#### `re-export TaskController, TaskPointer, TaskPointerPage, TaskRejectionReason, TaskSnapshot, TaskStatus, WatchOptions, WithdrawalReason`

```rust
pub use {
    error::{ErrorSource, ScheduleError, SchedulerError},
    model::{
        AuthorizationBindings,
        DispatchOffer,
        FailurePolicy,
        Occurrence,
        OccurrenceRef,
        Recurrence,
        Schedule,
        TaskFunding,
        TaskInputs,
        TaskOperation,
        TaskSpec,
    },
    receipt::{
        AbortReceipt,
        ScheduleDelta,
        ScheduledOccurrence,
        TaskMutationReceipt,
        TransactionReference,
        WithdrawnOccurrence,
    },
    snapshot::{
        ExecutionSnapshot,
        OccurrenceCost,
        OccurrencePage,
        OccurrenceSnapshot,
        OccurrenceSource,
        OccurrenceStatus,
        TaskController,
        TaskPointer,
        TaskPointerPage,
        TaskRejectionReason,
        TaskSnapshot,
        TaskStatus,
        WatchOptions,
        WithdrawalReason,
    },
};
```

#### `re-export pub, use, input_plan, TaskInputPlan`

```rust
pub use input_plan::TaskInputPlan;
```

#### `TaskInputs`

```rust
pub type TaskInputs = BTreeMap<String, BTreeMap<String, NexusData>>;
```

#### `TaskSpec`

```rust
pub struct TaskSpec {
    operation: TaskOperation,
    entry_group: String,
    inputs: TaskInputs,
    funding: TaskFunding,
    occurrence_budget_mist: u64,
    failure_policy: FailurePolicy,
}
```

#### `TaskSpec::new`

```rust
pub fn new(
        operation: TaskOperation,
        entry_group: impl Into<String>,
        funding: TaskFunding,
        occurrence_budget_mist: u64,
    ) -> Result<Self, ScheduleError> {
```

#### `TaskSpec::with_inputs`

```rust
pub fn with_inputs(mut self, inputs: TaskInputs) -> Self {
```

#### `TaskSpec::with_failure_policy`

```rust
pub const fn with_failure_policy(mut self, policy: FailurePolicy) -> Self {
```

#### `TaskSpec::operation`

```rust
pub const fn operation(&self) -> &TaskOperation {
```

#### `TaskSpec::entry_group`

```rust
pub fn entry_group(&self) -> &str {
```

#### `TaskSpec::inputs`

```rust
pub const fn inputs(&self) -> &TaskInputs {
```

#### `TaskSpec::funding`

```rust
pub const fn funding(&self) -> TaskFunding {
```

#### `TaskSpec::occurrence_budget_mist`

```rust
pub const fn occurrence_budget_mist(&self) -> u64 {
```

#### `TaskSpec::failure_policy`

```rust
pub const fn failure_policy(&self) -> FailurePolicy {
```

#### `TaskOperation`

```rust
pub enum TaskOperation {
    /// Runs a published DAG through the network's default Agent.
    DefaultDag {
        /// Published DAG object identifier.
        dag_id: sui::types::Address,
    },
    /// Runs one registered Agent skill.
    AgentSkill {
        /// Agent object identifier.
        agent_id: AgentId,
        /// Agent local skill identifier.
        skill_id: SkillId,
        /// Optional DAG selected for the skill.
        selected_dag: Option<sui::types::Address>,
        /// Recipients authorized at grant requiring DAG vertices.
        authorization_bindings: AuthorizationBindings,
    },
}
```

#### `TaskOperation::default_dag`

```rust
pub const fn default_dag(dag_id: sui::types::Address) -> Self {
```

#### `TaskOperation::agent_skill`

```rust
pub fn agent_skill(
        agent_id: AgentId,
        skill_id: SkillId,
        selected_dag: Option<sui::types::Address>,
        authorization_bindings: AuthorizationBindings,
    ) -> Self {
```

#### `TaskOperation::agent_id`

```rust
pub const fn agent_id(&self) -> Option<AgentId> {
```

#### `TaskOperation::selected_dag_id`

```rust
pub const fn selected_dag_id(&self) -> Option<sui::types::Address> {
```

#### `AuthorizationBindings`

```rust
pub type AuthorizationBindings = BTreeMap<String, sui::types::Address>;
```

#### `TaskFunding`

```rust
pub enum TaskFunding {
    /// Reserves sender owned SUI and assigns address control.
    Address {
        /// Amount reserved when the Task is created.
        prepay_amount_mist: u64,
        /// Optional recipient of unused reserved funds.
        refund_recipient: Option<sui::types::Address>,
    },
    /// Reserves funds from the selected Agent and assigns Agent control.
    Agent {
        /// Amount reserved from the Agent's payment vault.
        prepay_amount_mist: u64,
    },
}
```

#### `TaskFunding::address`

```rust
pub const fn address(prepay_amount_mist: u64) -> Self {
```

#### `TaskFunding::address_with_refund`

```rust
pub const fn address_with_refund(
        prepay_amount_mist: u64,
        refund_recipient: sui::types::Address,
    ) -> Self {
```

#### `agent`

```rust
pub const fn agent(prepay_amount_mist: u64) -> Self {
```

#### `TaskFunding::prepay_amount_mist`

```rust
pub const fn prepay_amount_mist(self) -> u64 {
```

#### `FailurePolicy`

```rust
pub enum FailurePolicy {
    /// Continue advertising eligible work.
    #[default]
    Continue,
    /// Pause the Task until its controller resumes it.
    Pause,
}
```

#### `Schedule`

```rust
pub struct Schedule {
    occurrences: Vec<Occurrence>,
    recurrence: Option<Recurrence>,
}
```

#### `Schedule::new`

```rust
pub const fn new() -> Self {
```

#### `Schedule::with_occurrence`

```rust
pub fn with_occurrence(mut self, occurrence: Occurrence) -> Self {
```

#### `Schedule::with_recurrence`

```rust
pub fn with_recurrence(mut self, recurrence: Recurrence) -> Self {
```

#### `Schedule::is_empty`

```rust
pub fn is_empty(&self) -> bool {
```

#### `Schedule::occurrences`

```rust
pub fn occurrences(&self) -> &[Occurrence] {
```

#### `Schedule::recurrence`

```rust
pub const fn recurrence(&self) -> Option<&Recurrence> {
```

#### `Schedule::validate_for_task_creation`

```rust
pub fn validate_for_task_creation(&self) -> Result<(), ScheduleError> {
```

#### `Recurrence`

```rust
pub struct Recurrence {
    first: Occurrence,
    interval_ms: u64,
    occurrences: Option<u64>,
}
```

#### `Recurrence::new`

```rust
pub fn new(first: Occurrence, interval_ms: u64) -> Result<Self, ScheduleError> {
```

#### `Recurrence::unbounded`

```rust
pub const fn unbounded(mut self) -> Self {
```

#### `Recurrence::finite`

```rust
pub fn finite(mut self, occurrences: u64) -> Result<Self, ScheduleError> {
```

#### `Recurrence::first`

```rust
pub const fn first(&self) -> &Occurrence {
```

#### `Recurrence::interval_ms`

```rust
pub const fn interval_ms(&self) -> u64 {
```

#### `Recurrence::occurrences`

```rust
pub const fn occurrences(&self) -> Option<u64> {
```

#### `Occurrence`

```rust
pub struct Occurrence {
    start: StartTime,
    deadline: Option<Deadline>,
    priority_fee_percentage: u64,
}
```

#### `Occurrence::now`

```rust
pub const fn now() -> Self {
```

#### `Occurrence::at_ms`

```rust
pub const fn at_ms(timestamp_ms: u64) -> Self {
```

#### `Occurrence::after_ms`

```rust
pub const fn after_ms(offset_ms: u64) -> Self {
```

#### `Occurrence::deadline_at_ms`

```rust
pub fn deadline_at_ms(mut self, timestamp_ms: u64) -> Result<Self, ScheduleError> {
```

#### `Occurrence::deadline_after_ms`

```rust
pub const fn deadline_after_ms(mut self, offset_ms: u64) -> Self {
```

#### `Occurrence::with_priority_fee_percentage`

```rust
pub fn with_priority_fee_percentage(mut self, percentage: u64) -> Result<Self, ScheduleError> {
```

#### `Occurrence::priority_fee_percentage`

```rust
pub const fn priority_fee_percentage(&self) -> u64 {
```

#### `OccurrenceRef`

```rust
pub struct OccurrenceRef {
    task_id: sui::types::Address,
    occurrence_id: u64,
}
```

#### `OccurrenceRef::new`

```rust
pub const fn new(task_id: sui::types::Address, occurrence_id: u64) -> Self {
```

#### `OccurrenceRef::task_id`

```rust
pub const fn task_id(self) -> sui::types::Address {
```

#### `OccurrenceRef::occurrence_id`

```rust
pub const fn occurrence_id(self) -> u64 {
```

#### `DispatchOffer`

```rust
pub struct DispatchOffer {
    occurrence: OccurrenceRef,
    effective_start_time_ms: u64,
    deadline_ms: Option<u64>,
    priority_fee_percentage: u64,
}
```

#### `DispatchOffer::new`

```rust
pub fn new(
        occurrence: OccurrenceRef,
        effective_start_time_ms: u64,
        deadline_ms: Option<u64>,
        priority_fee_percentage: u64,
    ) -> Result<Self, ScheduleError> {
```

#### `DispatchOffer::occurrence`

```rust
pub const fn occurrence(&self) -> OccurrenceRef {
```

#### `DispatchOffer::effective_start_time_ms`

```rust
pub const fn effective_start_time_ms(&self) -> u64 {
```

#### `DispatchOffer::deadline_ms`

```rust
pub const fn deadline_ms(&self) -> Option<u64> {
```

#### `DispatchOffer::priority_fee_percentage`

```rust
pub const fn priority_fee_percentage(&self) -> u64 {
```

#### `TransactionReference`

```rust
pub struct TransactionReference {
    digest: sui::types::Digest,
    checkpoint: u64,
}
```

#### `TransactionReference::digest`

```rust
pub const fn digest(&self) -> &sui::types::Digest {
```

#### `TransactionReference::checkpoint`

```rust
pub const fn checkpoint(&self) -> u64 {
```

#### `ScheduledOccurrence`

```rust
pub struct ScheduledOccurrence {
    reference: OccurrenceRef,
    start_time_ms: u64,
    deadline_ms: Option<u64>,
    priority_fee_percentage: u64,
    source: OccurrenceSource,
}
```

#### `ScheduledOccurrence::reference`

```rust
pub const fn reference(&self) -> OccurrenceRef {
```

#### `ScheduledOccurrence::start_time_ms`

```rust
pub const fn start_time_ms(&self) -> u64 {
```

#### `ScheduledOccurrence::deadline_ms`

```rust
pub const fn deadline_ms(&self) -> Option<u64> {
```

#### `ScheduledOccurrence::priority_fee_percentage`

```rust
pub const fn priority_fee_percentage(&self) -> u64 {
```

#### `ScheduledOccurrence::source`

```rust
pub const fn source(&self) -> OccurrenceSource {
```

#### `WithdrawnOccurrence`

```rust
pub struct WithdrawnOccurrence {
    reference: OccurrenceRef,
    reason: WithdrawalReason,
}
```

#### `WithdrawnOccurrence::reference`

```rust
pub const fn reference(&self) -> OccurrenceRef {
```

#### `WithdrawnOccurrence::reason`

```rust
pub const fn reason(&self) -> WithdrawalReason {
```

#### `ScheduleDelta`

```rust
pub struct ScheduleDelta {
    scheduled: Vec<ScheduledOccurrence>,
    withdrawn: Vec<WithdrawnOccurrence>,
    advertised: Option<OccurrenceRef>,
}
```

#### `ScheduleDelta::scheduled`

```rust
pub fn scheduled(&self) -> &[ScheduledOccurrence] {
```

#### `ScheduleDelta::withdrawn`

```rust
pub fn withdrawn(&self) -> &[WithdrawnOccurrence] {
```

#### `ScheduleDelta::advertised`

```rust
pub const fn advertised(&self) -> Option<OccurrenceRef> {
```

#### `ScheduleDelta::is_empty`

```rust
pub fn is_empty(&self) -> bool {
```

#### `TaskMutationReceipt`

```rust
pub struct TaskMutationReceipt {
    transaction: TransactionReference,
    task_id: sui::types::Address,
    delta: ScheduleDelta,
}
```

#### `TaskMutationReceipt::transaction`

```rust
pub const fn transaction(&self) -> &TransactionReference {
```

#### `TaskMutationReceipt::task_id`

```rust
pub const fn task_id(&self) -> sui::types::Address {
```

#### `TaskMutationReceipt::delta`

```rust
pub const fn delta(&self) -> &ScheduleDelta {
```

#### `AbortReceipt`

```rust
pub struct AbortReceipt {
    transaction: TransactionReference,
    occurrence: OccurrenceRef,
    execution_id: sui::types::Address,
}
```

#### `AbortReceipt::transaction`

```rust
pub const fn transaction(&self) -> &TransactionReference {
```

#### `AbortReceipt::occurrence`

```rust
pub const fn occurrence(&self) -> OccurrenceRef {
```

#### `AbortReceipt::execution_id`

```rust
pub const fn execution_id(&self) -> sui::types::Address {
```

#### `RecoveryReceipt`

```rust
pub struct RecoveryReceipt {
    pub(crate) occurrence: crate::scheduler::OccurrenceSnapshot,
    pub(crate) resolutions: Vec<crate::nexus::workflow::ExpiredWalkResolutionResult>,
    pub(crate) settlement: Option<TaskMutationReceipt>,
}
```

#### `RecoveryReceipt::occurrence`

```rust
pub const fn occurrence(&self) -> &crate::scheduler::OccurrenceSnapshot {
```

#### `RecoveryReceipt::resolutions`

```rust
pub fn resolutions(&self) -> &[crate::nexus::workflow::ExpiredWalkResolutionResult] {
```

#### `RecoveryReceipt::settlement`

```rust
pub const fn settlement(&self) -> Option<&TaskMutationReceipt> {
```

#### `TaskController`

```rust
pub enum TaskController {
    /// A Sui address controls the Task.
    Address {
        /// Controller address.
        address: sui::types::Address,
    },
    /// An Agent object controls the Task.
    Agent {
        /// Controller Agent identifier.
        agent_id: sui::types::Address,
    },
}
```

#### `TaskStatus`

```rust
pub enum TaskStatus {
    /// The Task may advertise and dispatch eligible work.
    Active,
    /// Dispatch is paused while future work is retained.
    Paused,
    /// Future work was canceled while in flight work may still settle.
    Canceled,
    /// Current admission rejected the proposal and released its reserve.
    Rejected {
        /// On chain reason proving why admission could not honor the proposal.
        reason: TaskRejectionReason,
    },
    /// Live resources were released while history was retained.
    Finalized,
}
```

#### `TaskRejectionReason`

```rust
pub enum TaskRejectionReason {
    /// Current code does not implement the proposal's WorkAdmission contract.
    UnsupportedWorkAdmission,
    /// The referenced Agent skill no longer matches the proposal snapshot.
    StaleSkillContract,
    /// The proposal references a mutable DAG rather than a finalized contract.
    MutableDAG,
}
```

#### `OccurrenceSource`

```rust
pub enum OccurrenceSource {
    /// The controller scheduled the occurrence independently.
    Standalone,
    /// A recurrence allocated the occurrence.
    Recurring {
        /// Zero based recurrence iteration.
        iteration: u64,
    },
}
```

#### `WithdrawalReason`

```rust
pub enum WithdrawalReason {
    /// A new recurrence replaced the recurrence candidate.
    RecurrenceReplaced,
    /// The controller cleared the recurrence.
    RecurrenceCleared,
    /// The controller canceled the Task.
    TaskCanceled,
    /// Current admission permanently rejected the enclosing Task.
    TaskRejected,
}
```

#### `OccurrenceStatus`

```rust
pub enum OccurrenceStatus {
    /// Allocated but not currently offered for dispatch.
    Pending,
    /// Currently offered to the leader network.
    Advertised,
    /// Dispatched while runtime work remains observable as incomplete.
    Executing,
    /// Runtime work is complete but scheduler settlement is pending.
    Finished,
    /// Scheduler settlement completed.
    Settled {
        /// Whether runtime execution succeeded.
        succeeded: bool,
    },
    /// The dispatch deadline elapsed before dispatch.
    Missed {
        /// Timestamp at which the scheduler recorded expiration.
        missed_at_ms: u64,
    },
    /// Removed from the Schedule before dispatch.
    Withdrawn {
        /// Reason the occurrence left its Schedule.
        reason: WithdrawalReason,
    },
}
```

#### `OccurrenceStatus::is_terminal`

```rust
pub const fn is_terminal(self) -> bool {
```

#### `TaskPointer`

```rust
pub struct TaskPointer {
    task_pointer_id: sui::types::Address,
    task_id: sui::types::Address,
}
```

#### `TaskPointer::task_pointer_id`

```rust
pub const fn task_pointer_id(&self) -> sui::types::Address {
```

#### `TaskPointer::task_id`

```rust
pub const fn task_id(&self) -> sui::types::Address {
```

#### `TaskPointerPage`

```rust
pub struct TaskPointerPage {
    task_pointers: Vec<TaskPointer>,
    next_cursor: Option<Vec<u8>>,
}
```

#### `TaskPointerPage::task_pointers`

```rust
pub fn task_pointers(&self) -> &[TaskPointer] {
```

#### `TaskPointerPage::next_cursor`

```rust
pub fn next_cursor(&self) -> Option<&[u8]> {
```

#### `TaskPointerPage::into_parts`

```rust
pub fn into_parts(self) -> (Vec<TaskPointer>, Option<Vec<u8>>) {
```

#### `ExecutionSnapshot`

```rust
pub struct ExecutionSnapshot {
    execution_id: sui::types::Address,
    created_at_ms: Option<u64>,
    active_walks: Option<u64>,
    pending_abort_walks: Option<u64>,
    pending_settlement_walks: Option<u64>,
    successful_walks: Option<u64>,
    failed_walks: Option<u64>,
    aborted_walks: Option<u64>,
}
```

#### `ExecutionSnapshot::execution_id`

```rust
pub const fn execution_id(&self) -> sui::types::Address {
```

#### `ExecutionSnapshot::created_at_ms`

```rust
pub const fn created_at_ms(&self) -> Option<u64> {
```

#### `ExecutionSnapshot::active_walks`

```rust
pub const fn active_walks(&self) -> Option<u64> {
```

#### `ExecutionSnapshot::pending_abort_walks`

```rust
pub const fn pending_abort_walks(&self) -> Option<u64> {
```

#### `ExecutionSnapshot::pending_settlement_walks`

```rust
pub const fn pending_settlement_walks(&self) -> Option<u64> {
```

#### `ExecutionSnapshot::successful_walks`

```rust
pub const fn successful_walks(&self) -> Option<u64> {
```

#### `ExecutionSnapshot::failed_walks`

```rust
pub const fn failed_walks(&self) -> Option<u64> {
```

#### `ExecutionSnapshot::aborted_walks`

```rust
pub const fn aborted_walks(&self) -> Option<u64> {
```

#### `OccurrenceSnapshot`

```rust
pub struct OccurrenceSnapshot {
    pub(crate) reference: OccurrenceRef,
    pub(crate) source: OccurrenceSource,
    pub(crate) requested_start_time_ms: u64,
    pub(crate) effective_start_time_ms: Option<u64>,
    pub(crate) deadline_ms: Option<u64>,
    pub(crate) priority_fee_percentage: u64,
    pub(crate) dispatched_at_ms: Option<u64>,
    pub(crate) settled_at_ms: Option<u64>,
    pub(crate) status: OccurrenceStatus,
    pub(crate) execution: Option<ExecutionSnapshot>,
    pub(crate) observed_task_version: sui::types::Version,
}
```

#### `OccurrenceSnapshot::reference`

```rust
pub const fn reference(&self) -> OccurrenceRef {
```

#### `OccurrenceSnapshot::source`

```rust
pub const fn source(&self) -> OccurrenceSource {
```

#### `OccurrenceSnapshot::requested_start_time_ms`

```rust
pub const fn requested_start_time_ms(&self) -> u64 {
```

#### `OccurrenceSnapshot::effective_start_time_ms`

```rust
pub const fn effective_start_time_ms(&self) -> Option<u64> {
```

#### `OccurrenceSnapshot::deadline_ms`

```rust
pub const fn deadline_ms(&self) -> Option<u64> {
```

#### `OccurrenceSnapshot::priority_fee_percentage`

```rust
pub const fn priority_fee_percentage(&self) -> u64 {
```

#### `OccurrenceSnapshot::dispatched_at_ms`

```rust
pub const fn dispatched_at_ms(&self) -> Option<u64> {
```

#### `OccurrenceSnapshot::settled_at_ms`

```rust
pub const fn settled_at_ms(&self) -> Option<u64> {
```

#### `OccurrenceSnapshot::status`

```rust
pub const fn status(&self) -> OccurrenceStatus {
```

#### `OccurrenceSnapshot::execution`

```rust
pub const fn execution(&self) -> Option<&ExecutionSnapshot> {
```

#### `OccurrenceSnapshot::observed_task_version`

```rust
pub const fn observed_task_version(&self) -> sui::types::Version {
```

#### `TaskSnapshot`

```rust
pub struct TaskSnapshot {
    pub(crate) task_id: sui::types::Address,
    pub(crate) controller: TaskController,
    pub(crate) status: TaskStatus,
    pub(crate) failure_policy: FailurePolicy,
    pub(crate) advertised: Option<OccurrenceRef>,
    pub(crate) allocated_occurrences: u64,
    pub(crate) pending_occurrences: u64,
    pub(crate) dispatched_occurrences: u64,
    pub(crate) in_flight_occurrences: u64,
    pub(crate) observed_version: sui::types::Version,
}
```

#### `TaskSnapshot::task_id`

```rust
pub const fn task_id(&self) -> sui::types::Address {
```

#### `TaskSnapshot::controller`

```rust
pub const fn controller(&self) -> TaskController {
```

#### `TaskSnapshot::status`

```rust
pub const fn status(&self) -> TaskStatus {
```

#### `TaskSnapshot::failure_policy`

```rust
pub const fn failure_policy(&self) -> FailurePolicy {
```

#### `TaskSnapshot::advertised`

```rust
pub const fn advertised(&self) -> Option<OccurrenceRef> {
```

#### `TaskSnapshot::allocated_occurrences`

```rust
pub const fn allocated_occurrences(&self) -> u64 {
```

#### `TaskSnapshot::pending_occurrences`

```rust
pub const fn pending_occurrences(&self) -> u64 {
```

#### `TaskSnapshot::dispatched_occurrences`

```rust
pub const fn dispatched_occurrences(&self) -> u64 {
```

#### `TaskSnapshot::in_flight_occurrences`

```rust
pub const fn in_flight_occurrences(&self) -> u64 {
```

#### `TaskSnapshot::observed_version`

```rust
pub const fn observed_version(&self) -> sui::types::Version {
```

#### `OccurrencePage`

```rust
pub struct OccurrencePage {
    occurrences: Vec<OccurrenceSnapshot>,
    next_cursor: Option<Vec<u8>>,
}
```

#### `OccurrencePage::occurrences`

```rust
pub fn occurrences(&self) -> &[OccurrenceSnapshot] {
```

#### `OccurrencePage::next_cursor`

```rust
pub fn next_cursor(&self) -> Option<&[u8]> {
```

#### `OccurrencePage::into_parts`

```rust
pub fn into_parts(self) -> (Vec<OccurrenceSnapshot>, Option<Vec<u8>>) {
```

#### `WatchOptions`

```rust
pub struct WatchOptions {
    timeout: Duration,
    poll_interval: Duration,
}
```

#### `WatchOptions::new`

```rust
pub const fn new(timeout: Duration, poll_interval: Duration) -> Self {
```

#### `WatchOptions::timeout`

```rust
pub const fn timeout(self) -> Duration {
```

#### `WatchOptions::poll_interval`

```rust
pub const fn poll_interval(self) -> Duration {
```

#### `OccurrenceCost`

```rust
pub struct OccurrenceCost {
    pub(crate) payment_id: sui::types::Address,
    pub(crate) max_budget_mist: u64,
    pub(crate) locked_budget_mist: u64,
    pub(crate) consumed_mist: u64,
    pub(crate) outstanding_locks: u64,
    #[serde(default)]
    pub(crate) outstanding_invocation_ids: Vec<sui::types::Address>,
    pub(crate) accomplished: bool,
    pub(crate) refunded: bool,
}
```

#### `OccurrenceCost::payment_id`

```rust
pub const fn payment_id(&self) -> sui::types::Address {
```

#### `OccurrenceCost::max_budget_mist`

```rust
pub const fn max_budget_mist(&self) -> u64 {
```

#### `OccurrenceCost::locked_budget_mist`

```rust
pub const fn locked_budget_mist(&self) -> u64 {
```

#### `OccurrenceCost::consumed_mist`

```rust
pub const fn consumed_mist(&self) -> u64 {
```

#### `OccurrenceCost::outstanding_locks`

```rust
pub const fn outstanding_locks(&self) -> u64 {
```

#### `OccurrenceCost::outstanding_invocation_ids`

```rust
pub fn outstanding_invocation_ids(&self) -> &[sui::types::Address] {
```

#### `OccurrenceCost::accomplished`

```rust
pub const fn accomplished(&self) -> bool {
```

#### `OccurrenceCost::refunded`

```rust
pub const fn refunded(&self) -> bool {
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.talus.network/reference/sdk/actions-scheduler.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
