Scheduler::Call

Variant 167 v393

pallet_scheduler::pallet::Call

Contains a variant per dispatchable extrinsic that this pallet has.

About This Type

Call enum for the Call pallet.

Contains all dispatchable functions (extrinsics) for the Call pallet. Each variant represents a different callable function with its parameters.

Variants (10)

IndexNameFieldsDocs
0schedule
when: u32
maybe_periodic: Option
priority: u8
Anonymously schedule a task.
1cancel
when: u32
index: u32
Cancel an anonymously scheduled task.
2schedule_named
when: u32
maybe_periodic: Option
priority: u8
Schedule a named task.
3cancel_namedCancel a named scheduled task.
4schedule_after
after: u32
maybe_periodic: Option
priority: u8
Anonymously schedule a task after a delay.
5schedule_named_after
after: u32
maybe_periodic: Option
priority: u8
Schedule a named task after a delay.
6set_retry
retries: u8
period: u32
Set a retry configuration for a task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`.
7set_retry_named
retries: u8
period: u32
Set a retry configuration for a named task so that, in case its scheduled run fails, it will be retried after `period` blocks, for a total amount of `retries` retries or until it succeeds. Tasks which need to be scheduled for a retry are still subject to weight metering and agenda space, same as a regular task. If a periodic task fails, it will be scheduled normally while the task is retrying. Tasks scheduled as a result of a retry for a periodic task are unnamed, non-periodic clones of the original task. Their retry configuration will be derived from the original task's configuration, but will have a lower value for `remaining` than the original `total_retries`.
8cancel_retryRemoves the retry configuration of a task.
9cancel_retry_namedCancel the retry configuration of a named task.

SCALE Encoding

Rule
1-byte variant index followed by variant-specific field data. 10 possible variants.
Size
variable (1+ bytes)

Examples

schedule = schedule(when, maybe_periodic, priority, call)
0x00<field0><field1><field2><field3>
00 Variant index 0 = schedule
field 0 when: u32
field 1 maybe_periodic: Option
field 2 priority: u8
field 3 call: RuntimeCall
cancel = cancel(when, index)
0x01<field0><field1>
01 Variant index 1 = cancel
field 0 when: u32
field 1 index: u32
schedule_named = schedule_named(id, when, maybe_periodic, priority, call)
0x02<field0><field1><field2><field3><field4>
02 Variant index 2 = schedule_named
field 0 id: [u8; 32]
field 1 when: u32
field 2 maybe_periodic: Option
field 3 priority: u8
field 4 call: RuntimeCall

Code Examples

import { TypeRegistry } from "@polkadot/types";

const registry = new TypeRegistry();

// Encode Scheduler::Call — variant "schedule"
const value = registry.createType("Scheduler::Call", { schedule: { when: 1000000, maybe_periodic: 0, priority: 42, call: 0 } });
console.log("Hex:", value.toHex());

Type Parameters

T

Referenced By (23)

and 3 more...

Also See

Type Information

Type ID
167
Kind
Variant
Path
pallet_scheduler::pallet::Call
Runtime
v393