SQL Agent Insights:Documentation:Create a new job
Creating a SQL Server® Agent job
- From within the Job Monitor window, click the plus sign (+) in the toolbar which will open the New Job dialog.
- On the General page, fill in the following options:
- Name
A required field. Enter the name of the job as you want it to appear within Job Monitor. - Owner
From the dropdown provided, select an owner for the job. - Category
Choose the category for the job from the dropdown list of items available. - Description
Input a meaningful description of the job. - Enabled (toggle)
A new job by default will be enabled. Disabling the job prevents it from being scheduled and will not fire, unless the job is started use the sp_start_job stored procedure. - E-mail (toggle)
Select this option to send an e-mail to the chosen Operator. This notification is triggered When the job fails, When the job succeeds, or, When the job completes. - Page (toggle)
Select this option to send an e-mail to the chosen Operator's pager. This notification is triggered When the job fails, When the job succeeds, or, When the job completes. - Write to the Windows Application log (toggle)
Select this option to write an entry to the Windows® application event log. This notification is triggered When the job fails, When the job succeeds, or, When the job completes. - Automatically delete job (toggle)
Select this option to delete this job. This event is triggered When the job fails, When the job succeeds, or, When the job completes. - Version
A read-only field showing the version number of the job. - Last Executed
A read-only field showing the date and time the job last started running. - Created
A read-only field showing the date and time the job was created. - Last Modified
A read-only field showing the date and time the job was last modified.
- Name
- Use the Steps page to create, organize and/or modify job steps with the necessary step logic.
- New
Create a new job step placing it at the end of any existing steps. - Insert
Create a new job step placing it above the currently selected step. - Edit
Modify the selected job step. - Delete
- Deletes the selected job step.
- Error creating thumbnail: Unable to save thumbnail to destination Microsoft documentation states "When job steps are deleted their output log is automatically deleted", so ensure this is the action you want to perform. No confirmation dialog will be provided when deleting a job step. Clicking on Create or Update will save those changes to the job and the job step(s) will be unrecoverable.
Should you delete a job step in error, it is best to Cancel out of the Job Properties dialog foregoing any changes.
- Move Up
- Moves the selected job step up one placement in the list of steps.
- Move Down
- Moves the selected job step down one placement in the list of steps.
- Set Start Step
- Sets the selected step as the starting step for the job. A right arrow (>) in the row header indicates the starting step for the job.
- New
- Use the Schedules page, to create and/or organize schedules.
- New
- Opens the Create New Schedule dialog. After the new schedule is created, it is added to the job.
- Pick
- Opens the Pick a Schedule dialog allowing the selection of an existing schedule. The selected schedule is added to the job.
- Edit
- Opens the Schedule Properties dialog allowing the selected schedule to be edited.
- Remove
- Removes the selected schedule from the job. Removing all schedules from a job effectively prevents this job from running.
- Use the Targets page on multi-server SQL agent configurations to target multiple SQL Server® agent instances for the job if desired.
- Target Local Server
- Run the job on the local instance. This option is the default should there be no target servers enlisted.
- Target Multiple Servers
- Run the job on one or more target instances. After selecting this radio button, highlight the instances to run the job on.
- When finished, click the Create button.
- Job Monitor will refresh showing the newly created job.
Microsoft®, Windows® and SQL Server® are registered trademarks of Microsoft Corporation in the United States and/or other countries.
Some icons courtesy of Icons8