Skip to content

chainabit chain schedule set ​

Published (2.2.0) ​

This command is not included in Published (2.2.0). It is available in Development (2.2.0).

Development (2.2.0) ​

Create a schedule for a chain or edit an existing schedule

Synopsis ​

text
chainabit chain schedule set <id> [options]

Arguments ​

ArgumentDescriptionDefault
<id>Required.—

Options ​

OptionDescriptionDefault
--existingUse a schedule ID to edit an existing schedule—
--schedule-type <type>Schedule type. Accepted values: daily, weekly, monthly, custom, cron.—
--period-length <interval>Period length—
--period-anchor <date>Period anchor date—
--timezone <zone>Time zone—
--schedule-json <json>Schedule details in JSON—
--is-active <boolean>Active. Accepted values: true, false.—
--yesConfirm this change—

Options shared by every command are described in Global options and shared behavior.

Behavior ​

Without --existing, the ID is a chain ID and the command creates a schedule for that chain; --schedule-type and --period-length are then required. With --existing, the ID is a schedule ID and the command changes only the fields you pass; at least one field is required. A schedule created without --timezone uses UTC.

--period-anchor sets the date the periods are anchored to. --schedule-type is one of daily, weekly, monthly, custom or cron. --period-length is an interval such as 7 days. --schedule-json must be a JSON object; text that is not valid JSON, or a JSON array, is refused. --is-active takes true or false. Invalid input is refused before anything is sent.

This command changes data, so it asks for confirmation. In a terminal it shows the action and asks you to confirm; if you decline, nothing changes. Pass --yes to skip the question. With --json, or when there is no terminal, the command changes nothing and exits with code 2 unless you pass --yes.

Output ​

The output shows the schedule with its ID, type, period length, time zone, anchor date, details and active state. With --json it contains id, chainId, scheduleType, periodLength, timezone, periodAnchor, scheduleJson and isActive.

Authentication and permissions ​

You must be signed in. The server decides whether your account may make this change and refuses it otherwise.

Examples ​

bash
chainabit chain schedule set 00000000-0000-4000-8000-000000000001 --schedule-type weekly --period-length "7 days" --yes
chainabit chain schedule set 00000000-0000-4000-8000-000000000003 --existing --timezone Europe/Istanbul --yes
chainabit chain schedule set 00000000-0000-4000-8000-000000000001 --schedule-type weekly --period-length "7 days" --schedule-json '{"weekday":3}' --yes

Built with purpose. chainabit.com