Sunday, November 4, 2018

How to schedule Agent job to run every 2 weeks

SQL Server Agent job scheduling is generally pretty easy, but I still have received this question many times.  I've even Googled it myself this morning, and am very surprised about all the inquiries on how to do this, and all of the different suggested solutions.  No, you don't need Powershell.  No, you don't have to create two jobs with two different schedules.  You don't even need two different schedules for one job...  It really is quite simple.  

For example, say we need to run a job every two weeks on Saturday.  You will create a new schedule, or edit your existing one to be like the one I've shown here.  The trick is with the Frequency.  Choose 'Weekly' and set it to recur every 2 weeks.  And, of course, be sure to check the Saturday box.  

That's it!  Now your Agent job will run every two weeks on Saturday, at 7AM.

No comments:

Post a Comment