Manage jobs and schedule
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 |
|
Display information about jobs on a per-node basis |
|
Display information about cluster-affiliated jobs |
|
Display information about completed jobs |
|
Display information about job history |
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 |
|
Display information about completed private jobs |
|
Display information about the initialization state for job managers |
|
Monitor the progress of a job |
|
Monitor the progress of a private job |
|
Pause a job |
|
Pause a private job |
|
Resume a paused job |
|
Resume a paused private job |
|
Stop a job |
|
Stop a private job |
|
Delete a job |
|
Delete a private job |
|
Disassociate a cluster-affiliated job with an unavailable node that owns it, so that another node can take ownership of that job |
|
You can use the |
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 |
|
Display the list of jobs by schedule |
|
Display information about cron schedules |
|
Display information about interval schedules |
|
Create a cron schedule |
Beginning with ONTAP 9.10.1, you can include the SVM for your job schedule. |
Create an interval schedule |
You must specify at least one of the following parameters: |
Modify a cron schedule |
|
Modify an interval schedule |
|
Delete a schedule |
|
Delete a cron schedule |
|
Delete an interval schedule |
|