ONTAP 9.13.1 commands

job schedule cron create

Create a cron schedule

Availability: This command is available to cluster and Vserver administrators at the admin privilege level.

Description

The job schedule cron create command creates a cron schedule. A cron schedule, like a UNIX cron job, runs at a specified time. You can also specify months, days of the month, or days of the week on which the schedule will run.

If you specify values for both days of the month and days of the week, they are considered independently. For example, a cron schedule with the day specification Friday, 13 runs every Friday and on the 13th day of each month, not just on every Friday the 13th.

Parameters

[-cluster <Cluster name>] - Cluster

This parameter specifies the name of the cluster on which you want to create a cron schedule. By default, the schedule is created on the local cluster. In a MetroCluster configuration, the partner cluster can be specified if the local cluster is in switchover state.

[-vserver <vserver name>] - Vserver

This parameter specifies the name of the Vserver on which you want to create a cron schedule.

-name <text> - Name

Use this parameter to specify the name of the cron schedule that you want to create.

[-month <cron_month>,…​] - Month

Use this parameter to specify months in which the schedule runs. Valid values are January, February, March, April, May, June, July, August, September, October, November, December, and all. Specify "all" to run the schedule every month.

[-dayofweek <cron_dayofweek>,…​] - Day of Week

Use this parameter to specify days of the week on which the schedule runs. Valid values are Sunday, Monday, Tuesday, Thursday, Friday, and Saturday, and all. Specify "all" to run the schedule every day.

[-day <cron_dayofmonth>,…​] - Day

Use this parameter to specify days of the month on which the schedule runs. Valid values range from 1 to 31.

[-hour <cron_hour>,…​] - Hour

Use this parameter to specify the hours value of the time of day at which the schedule runs. Valid values range from 0 (midnight) to 23 (11:00 p.m.). Specify "all" to run the schedule every hour.

-minute <cron_minute>,…​ - Minute

Use this parameter to specify the minutes portion of the time of day at which the schedule runs. Valid values range from 0 to 59.

Examples

The following example creates a cron schedule named weekendcron that runs on weekend days (Saturday and Sunday) at 3:00 a.m.

cluster1::> job schedule cron create -name weekendcron -dayofweek "Saturday, Sunday" -hour 3 -minute 0
Top of Page