Creates a schedule. Permissions required: fc or a


A schedule can be associated with a volume to automate mirror syncing and snapshot creation. See volume create and volume modify.

Syntax

CLI

maprcli schedule create
    [ -cluster <cluster> ]
    -schedule <JSON>

REST

http[s]://<host>:<port>/rest/schedule/create?<parameters> 

Parameters



Parameter

Description

cluster

The cluster on which to run the command.

schedule

A JSON object describing the schedule. SeeĀ  Schedule Objects for more information.

Examples

Scheduling a Single Occurrence

CLI

maprcli schedule create -schedule '{"name":"Schedule-1","rules":[{"frequency":"once","retain":"1w","time":13,"date":"12/5/2010"}]}'

REST

https://r1n1.sj.us:8443/rest/schedule/create?schedule={"name":"Schedule-1","rules":[{"frequency":"once","retain":"1w","time":13,"date":"12/5/2010"}]}

A Schedule with Several Rules

CLI

maprcli schedule create -schedule '{"name":"Schedule-2","rules":[{"frequency":"weekly","date":"sun","time":7,"retain":"2w"},{"frequency":"daily","time":14,"retain":"1w"},{"frequency":"hourly","retain":"1w"},{"frequency":"yearly","date":"11/5","time":14,"retain":"1w"}]}'

REST

https://r1n1.sj.us:8443/rest/schedule/create?schedule={"name":"Schedule-1","rules":[{"frequency":"weekly","date":"sun","time":7,"retain":"2w"},{"frequency":"daily","time":14,"retain":"1w"},{"frequency":"hourly","retain":"1w"},{"frequency":"yearly","date":"11/5","time":14,"retain":"1w"}]}