SQL Server agent is used to schedule a job that has to run periodically. If you are a DBA, one of your admin tasks is to schedule jobs. Suppose you are in a situation to run a set of codes every alternate Saturday, you can do it using the following steps:
Open SQL Server Management Studio (SSMS). Under SQL Server agent, create a new job named test. Click on Schedules and button called New.
![sql-server-schedule sql-server-schedule](http://lh4.ggpht.com/-bqduyeTTdZE/TpP1LivKmvI/AAAAAAAAAQE/4squxVS_pcQ/sql-server-schedule%25255B3%25255D.jpg?imgmax=800)
A new window will popup. Under frequency section, select weekly for "Occurs" option. Select 2 on "Recurs every" option. Under days option choose "Saturday". Click ok.
![sql-agent-job sql-agent-job](http://lh6.ggpht.com/-x8Yt8j6dWac/TpP1MrjM1jI/AAAAAAAAAQM/vhiE0MrEN8o/sql-agent-job%25255B3%25255D.jpg?imgmax=800)
Now the job will run every alternate Saturday on the time specified.
No comments:
Post a Comment