Skip to main content
A newer release of this product is available.

job schedule cron modify

Contributors
Suggest changes

Modify a cron schedule

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

Description

The job schedule cron modify command modifies 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 runs. Use the job schedule cron show command to display all current cron schedules. See the documentation for job schedule cron show for more information about how cron schedules work.

Modifying one parameter of a cron schedule does not affect the other parameters. For example, if cron schedule is set to run at 3:15 AM, and you modify the "hour" parameter to 4, the schedule's new time will be 4:15am. To clear a parameter of the schedule's interval, you must explicitly set that portion to "0" or "-" Some parameters can also be set to "all".

Parameters

[-cluster <Cluster name>] - Cluster

Use this parameter to specify the cluster of an existing cron schedule you want to modify. The local cluster is provided as the default value. In a MetroCluster configuration, the partner cluster can be specified if the local cluster is in switchover state.

[-vserver <vserver name>] - Vserver

Use this parameter to specify the Vserver of an existing cron schedule you want to modify.

-name <text> - Name

Use this parameter with the name of an existing cron schedule to specify the cron schedule you want to modify.

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

Use this parameter to specify a new "month" value for the cron schedule. Valid values are January, February, March, April, May, June, July, August, September, October, November, December, or all. Specify "all" to run the schedule every month.

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

Use this parameter to specify a new "day of week" value for the cron schedule. Valid values include Sunday, Monday, Tuesday, Thursday, Friday, Saturday, or all. Specify "all" to run the schedule every day.

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

Use this parameter to specify a new "day of month" value for the cron schedule. Valid values range from 1 to 31.

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

Use this parameter to specify a new "hour of the day" value for the cron schedule. 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 a new "minute of the hour" value for the cron schedule. Valid values range from 0 to 59.

Examples

The following example modifies a cron schedule named weekendcron so that it runs at 3:15 a.m.:

cluster1::> job schedule cron modify -name weekendcron -hour 3 -minute 15