Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

⏱️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).

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.

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

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

Scheduler

Scheduler::preflight_task_inputs

Scheduler::create_task

Scheduler::schedule_task

Scheduler::task

Scheduler::task_pointers

OccurrenceHandle

OccurrenceHandle::reference

OccurrenceHandle::snapshot

OccurrenceHandle::watch

OccurrenceHandle::watch_until

OccurrenceHandle::expire

OccurrenceHandle::settle

OccurrenceHandle::cost

OccurrenceHandle::resolve_expired

OccurrenceHandle::abort_expired

TaskHandle

TaskHandle::id

TaskHandle::occurrence

TaskHandle::snapshot

TaskHandle::occurrences

TaskHandle::add_occurrence

TaskHandle::set_recurrence

TaskHandle::clear_recurrence

TaskHandle::pause

TaskHandle::resume

TaskHandle::cancel

TaskHandle::refill

TaskHandle::close

ErrorSource

ScheduleError

SchedulerError

TaskInputPlan

TaskInputPlan::new

TaskInputPlan::preflight_inputs

TaskInputPlan::has_uploads

TaskInputPlan::has_references

TaskInputPlan::verify_references

TaskInputPlan::materialize_with

re-export pub, use, receipt, RecoveryReceipt

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

re-export pub, use, input_plan, TaskInputPlan

TaskInputs

TaskSpec

TaskSpec::new

TaskSpec::with_inputs

TaskSpec::with_failure_policy

TaskSpec::operation

TaskSpec::entry_group

TaskSpec::inputs

TaskSpec::funding

TaskSpec::occurrence_budget_mist

TaskSpec::failure_policy

TaskOperation

TaskOperation::default_dag

TaskOperation::agent_skill

TaskOperation::agent_id

TaskOperation::selected_dag_id

AuthorizationBindings

TaskFunding

TaskFunding::address

TaskFunding::address_with_refund

agent

TaskFunding::prepay_amount_mist

FailurePolicy

Schedule

Schedule::new

Schedule::with_occurrence

Schedule::with_recurrence

Schedule::is_empty

Schedule::occurrences

Schedule::recurrence

Schedule::validate_for_task_creation

Recurrence

Recurrence::new

Recurrence::unbounded

Recurrence::finite

Recurrence::first

Recurrence::interval_ms

Recurrence::occurrences

Occurrence

Occurrence::now

Occurrence::at_ms

Occurrence::after_ms

Occurrence::deadline_at_ms

Occurrence::deadline_after_ms

Occurrence::with_priority_fee_percentage

Occurrence::priority_fee_percentage

OccurrenceRef

OccurrenceRef::new

OccurrenceRef::task_id

OccurrenceRef::occurrence_id

DispatchOffer

DispatchOffer::new

DispatchOffer::occurrence

DispatchOffer::effective_start_time_ms

DispatchOffer::deadline_ms

DispatchOffer::priority_fee_percentage

TransactionReference

TransactionReference::digest

TransactionReference::checkpoint

ScheduledOccurrence

ScheduledOccurrence::reference

ScheduledOccurrence::start_time_ms

ScheduledOccurrence::deadline_ms

ScheduledOccurrence::priority_fee_percentage

ScheduledOccurrence::source

WithdrawnOccurrence

WithdrawnOccurrence::reference

WithdrawnOccurrence::reason

ScheduleDelta

ScheduleDelta::scheduled

ScheduleDelta::withdrawn

ScheduleDelta::advertised

ScheduleDelta::is_empty

TaskMutationReceipt

TaskMutationReceipt::transaction

TaskMutationReceipt::task_id

TaskMutationReceipt::delta

AbortReceipt

AbortReceipt::transaction

AbortReceipt::occurrence

AbortReceipt::execution_id

RecoveryReceipt

RecoveryReceipt::occurrence

RecoveryReceipt::resolutions

RecoveryReceipt::settlement

TaskController

TaskStatus

TaskRejectionReason

OccurrenceSource

WithdrawalReason

OccurrenceStatus

OccurrenceStatus::is_terminal

TaskPointer

TaskPointer::task_pointer_id

TaskPointer::task_id

TaskPointerPage

TaskPointerPage::task_pointers

TaskPointerPage::next_cursor

TaskPointerPage::into_parts

ExecutionSnapshot

ExecutionSnapshot::execution_id

ExecutionSnapshot::created_at_ms

ExecutionSnapshot::active_walks

ExecutionSnapshot::pending_abort_walks

ExecutionSnapshot::pending_settlement_walks

ExecutionSnapshot::successful_walks

ExecutionSnapshot::failed_walks

ExecutionSnapshot::aborted_walks

OccurrenceSnapshot

OccurrenceSnapshot::reference

OccurrenceSnapshot::source

OccurrenceSnapshot::requested_start_time_ms

OccurrenceSnapshot::effective_start_time_ms

OccurrenceSnapshot::deadline_ms

OccurrenceSnapshot::priority_fee_percentage

OccurrenceSnapshot::dispatched_at_ms

OccurrenceSnapshot::settled_at_ms

OccurrenceSnapshot::status

OccurrenceSnapshot::execution

OccurrenceSnapshot::observed_task_version

TaskSnapshot

TaskSnapshot::task_id

TaskSnapshot::controller

TaskSnapshot::status

TaskSnapshot::failure_policy

TaskSnapshot::advertised

TaskSnapshot::allocated_occurrences

TaskSnapshot::pending_occurrences

TaskSnapshot::dispatched_occurrences

TaskSnapshot::in_flight_occurrences

TaskSnapshot::observed_version

OccurrencePage

OccurrencePage::occurrences

OccurrencePage::next_cursor

OccurrencePage::into_parts

WatchOptions

WatchOptions::new

WatchOptions::timeout

WatchOptions::poll_interval

OccurrenceCost

OccurrenceCost::payment_id

OccurrenceCost::max_budget_mist

OccurrenceCost::locked_budget_mist

OccurrenceCost::consumed_mist

OccurrenceCost::outstanding_locks

OccurrenceCost::outstanding_invocation_ids

OccurrenceCost::accomplished

OccurrenceCost::refunded

Last updated