troubleshooting Question

Dynamically rescheduling SQL job

Avatar of oromm
orommFlag for United States of America asked on
Microsoft SQL Server
7 Comments2 Solutions882 ViewsLast Modified:
I need a way to have a SQL job reschedule itself for the 2nd or 3rd business day of each month.  I can generate a query that will determine the specific date that will be for the upcoming month (taking into holidays which are stored in a database table), but how do I append logic to a job (either as a new step or appending to an existing step) to adjust the same job's schedule?

In addition to that, I may also need to include logic that, based on results from the current execution, I need to schedule the job to run the next day until the desired results are detected, and then schedule it for the beginning of the next month.  I expect that both requirements can be based off the same general logic (which is what I am missing).  
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros