Skip to main content
Version: 3.1

SchedulePolicy

You can use a schedule policy to specify when Portworx should trigger a specific operation. Schedule policies do not contain any actions themselves. Also, they are not namespaced. Storage policies are similar to storage classes where an admin creates a schedule policy, and then the users consume it.

SchedulePolicy schema

This section explains the fields you can use to configure a SchedulePolicy object.

A SchedulePolicy object has the following sections:

  • Interval: For interval operations, how frequently Portworx will trigger the operation
  • Daily: For daily operations, Portworx will trigger the operation at the specified time every day
  • Weekly: For weekly operations, Portworx will trigger the operation at the specified day and time every week
  • Monthly: For monthly operations, Portworx will trigger the operation at the specified day and time every month
FieldDescriptionTypeDefault
apiVersionSpecifies which version of the Stork API you're using to create this objectstringstork.
libopenstorage.org/
v1alpha1
kindSpecifies the type of the CRD as SchedulePolicystring
metadata.
name
Specifies a name for the SchedulePolicy objectstring
policy.
interval.
intervalMinutes
Specifies the interval, in minutes, after which Portworx triggers the operationnumber
policy.
interval.
retain
For backup operations, specifies how many backups Portworx will retainnumber10
policy.
daily.
time
Specifies the time of the day when Portworx will trigger the operation, in the 12 hour AM/PM formatstring
policy.
daily.
retain
For backup operations, specifies how many backups Portworx will retainnumber30
policy.
daily.
forceFullSnapshotDay
For backup operations, specifies on which day to trigger a full backup. By default, Portworx will perform 6 incremental and 1 full backup. This field allows you to enforce a full backup in the daily policy on a specific day.stringMonday
policy.
weekly.
day
Specifies the day of the week when Portworx will trigger the operation. You can use both the abbreviated or the full name of the day of the weekstring
policy.
weekly.
time
Specifies the time of the day when Portworx will trigger the operation, in the 12 hour AM/PM formatstring
policy.
weekly.
retain
For backup operations, specifies how many backups Portworx will retainstring7
policy.
monthly.
day
Specifies the day of the month when Portworx will trigger the operation 1number
policy.
monthly.
time
Specifies the time of the day when Portworx will trigger the operation, in the 12 hour AM/PM formatstring
policy.
monthly.
retain
For backup operations, specifies how many backups Portworx will retainnumber12

SchedulePolicy examples

Interval SchedulePolicy

An interval SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.interval.intervalInMinutes: the interval, in minutes, after which Portworx triggers the operation (this example triggers the operation every minute)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    interval:
    intervalMinutes: 1

Daily SchedulePolicy

A daily SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.daily.time: the time of the day when Portworx will trigger the operation (this example triggers the operation every day at 10:14 PM)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    daily:
    time: "10:14PM"

Weekly SchedulePolicy

A weekly SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.weekly.day: the day of the week when Portworx will trigger the operation (this example triggers the operation every Thursday)

  • policy.weekly.time: the time of the day when Portworx will trigger the operation (this example triggers the operation at 10:13 PM)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    weekly:
    day: "Thursday"
    time: "10:13PM"

Monthly SchedulePolicy

A monthly SchedulePolicy includes the following fields and values:

  • apiVersion: the version of the Stork scheduler (this example uses stork.libopenstorage.org/v1alpha1)

  • kind: as SchedulePolicy

  • metadata.name: the name of the SchedulePolicy object (this example uses testpolicy)

  • policy.monthly.day: the day of the month when Portworx will trigger the operation (this example triggers the operation on the 14th of every month)

  • policy.monthly.time: the time of the day when Portworx will trigger the operation (this example triggers the operation at 8:05 PM)

    apiVersion: stork.libopenstorage.org/v1alpha1
    kind: SchedulePolicy
    metadata:
    name: testpolicy
    policy:
    monthly:
    date: 14
    time: "8:05PM"

Footnotes

  1. The date of the month should be greater than 0 and less than 31. If the specified date is invalid, it will roll over to the next month. For example, if you specify the date as Feb 31, Portworx will trigger the operation either on the 2nd or 3rd March, depending on whether a year is a leap year or not.

Was this page helpful?