The schedule commands let you work with schedules:

A schedule is a JSON object that specifies a single or recurring time for volume snapshot creation or mirror syncing. For a schedule to be useful, it must be associated with at least one volume. See volume create and volume modify.

Schedule Fields

The schedule object contains the following fields:

Field

Value

id

The ID of the schedule.

name

The name of the schedule.

inuse

Indicates whether the schedule is associated with an action.

rules

An array of JSON objects specifying how often the scheduled action occurs. See Rule Fields below.

Rule Fields

The following table shows the fields to use when creating a rules object.

Field

Values

frequency

How often to perform the action:

  • once - Once
  • yearly - Yearly
  • monthly - Monthly
  • weekly - Weekly
  • daily - Daily
  • hourly - Hourly
  • semihourly - Every 30 minutes
  • quarterhourly - Every 15 minutes
  • fiveminutes - Every 5 minutes
  • minute - Every minute

retain

How long to retain the data resulting from the action. For example, if the schedule creates a snapshot, the retain field sets the snapshot's expiration. The retain field consists of an integer and one of the following units of time:

  • mi - minutes
  • h - hours
  • d - days
  • w - weeks
  • m - months
  • y - years

time

The time of day to perform the action, in 24-hour format: HH

date

The date on which to perform the action:

  • For single occurrences, specify month, day and year: MM/DD/YYYY
  • For yearly occurrences, specify the month and day: MM/DD
  • For monthly occurrences occurrences, specify the day: DD
    Daily and hourly occurrences do not require the date field.

Example

The following example JSON shows a schedule called "snapshot," with three rules.

     {
            "id":8,
            "name":"snapshot",
            "inuse":0,
            "rules":[
                {
                    "frequency":"monthly",
                    "date":"8",
                    "time":14,
                    "retain":"1m"
                },
                {
                    "frequency":"weekly",
                    "date":"sat",
                    "time":14,
                    "retain":"2w"
                },
                {
                    "frequency":"hourly",
                    "retain":"1d"
                }
            ]
        }