Skip to main content

Manage jobs and schedule

Contributors

Jobs are placed into a job queue and run in the background when resources are available. If a job is consuming too many cluster resources, you can stop it or pause it until there is less demand on the cluster. You can also monitor and restart jobs.

Job categories

There are three categories of jobs that you can manage: server-affiliated, cluster-affiliated, and private.

A job can be in any of the following categories:

  • Server-Affiliated jobs

    These jobs are queued by the management framework to a specific node to be run.

  • Cluster-Affiliated jobs

    These jobs are queued by the management framework to any node in the cluster to be run.

  • Private jobs

    These jobs are specific to a node and do not use the replicated database (RDB) or any other cluster mechanism. The commands that manage private jobs require the advanced privilege level or higher.

Commands for managing jobs

When you enter a command that invokes a job, typically, the command informs you that the job has been queued and then returns to the CLI command prompt. However, some commands instead report job progress and do not return to the CLI command prompt until the job has been completed. In these cases, you can press Ctrl-C to move the job to the background.

If you want to…​ Use this command…​

Display information about all jobs

job show

Display information about jobs on a per-node basis

job show bynode

Display information about cluster-affiliated jobs

job show-cluster

Display information about completed jobs

job show-completed

Display information about job history

job history show

Up to 25,000 job records are stored for each node in the cluster. Consequently, attempting to display the full job history could take a long time. To avoid potentially long wait times, you should display jobs by node, storage virtual machine (SVM), or record ID.

Display the list of private jobs

job private show (advanced privilege level)

Display information about completed private jobs

job private show-completed (advanced privilege level)

Display information about the initialization state for job managers

job initstate show (advanced privilege level)

Monitor the progress of a job

job watch-progress

Monitor the progress of a private job

job private watch-progress (advanced privilege level)

Pause a job

job pause

Pause a private job

job private pause (advanced privilege level)

Resume a paused job

job resume

Resume a paused private job

job private resume (advanced privilege level)

Stop a job

job stop

Stop a private job

job private stop (advanced privilege level)

Delete a job

job delete

Delete a private job

job private delete (advanced privilege level)

Disassociate a cluster-affiliated job with an unavailable node that owns it, so that another node can take ownership of that job

job unclaim (advanced privilege level)

Note

You can use the event log show command to determine the outcome of a completed job.

Related information

ONTAP 9 Commands

Commands for managing job schedules

Many tasks—​for instance, volume Snapshot copies—​can be configured to run on specified schedules.Schedules that run at specific times are called cron schedules (similar to UNIX cron schedules). Schedules that run at intervals are called interval schedules. You use the job schedule commands to manage job schedules.

Job schedules do not adjust to manual changes to the cluster date and time. These jobs are scheduled to run based on the current cluster time when the job was created or when the job most recently ran. Therefore, if you manually change the cluster date or time, you should use the job show and job history show commands to verify that all scheduled jobs are queued and completed according to your requirements.

If the cluster is part of a MetroCluster configuration, then the job schedules on both clusters must be identical. Therefore, if you create, modify, or delete a job schedule, you must perform the same operation on the remote cluster.

If you want to…​ Use this command…​

Display information about all schedules

job schedule show

Display the list of jobs by schedule

job schedule show-jobs

Display information about cron schedules

job schedule cron show

Display information about interval schedules

job schedule interval show

Create a cron schedule

job schedule cron create

Beginning with ONTAP 9.10.1, you can include the SVM for your job schedule.

Create an interval schedule

job schedule interval create

You must specify at least one of the following parameters: -days, -hours, -minutes, or -seconds.

Modify a cron schedule

job schedule cron modify

Modify an interval schedule

job schedule interval modify

Delete a schedule

job schedule delete

Delete a cron schedule

job schedule cron delete

Delete an interval schedule

job schedule interval delete

Related information

ONTAP 9 Commands