Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

challening job scheduling question

Status
Not open for further replies.

equus2

Programmer
Mar 5, 2008
36
US
Hi,

I need a way to change the run time of a job that normally runs at 4:45 am each day.

The catch is, I only want to change the run time on 2 days of the month (which will be dynamically determined each month); so it's not like I know the days before hand.

Help, is there a good way to do this?

Thanks!

 
Schedules don't work that well with "dynamic"...they like to be static :).

I've never done this before, but I imagine if you have some type of scheduling item that you can modify...like an Outlook Calendar or something, then you could write an app that calls to the SQL Server and runs the job manually.

Personally, I would try to find a way to make the schedule more static.

im in ur stakz, overflowin ur heapz!
 
What's the logic that will drive the days when the job needs to be run at the different times?

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
I found a solution.

I created a "controller job" that calls a stored proc that contains the logic for when to start the "dynamic job". Of course, the job isn't dynamic. The code in the stored proc is "dynamic"... which uses WAITFOR and sp_start_job to start the job based on the logic I want.

Works great. The hard part was writing the logic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top