Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Scheduling SQL Job

Author  Topic 

rstrong
Starting Member

1 Post

Posted - 2007-11-15 : 10:48:37
My boss wants to schedule a job that will run on the Wednesday night before the first Thursday of every month, recur on the first Thursday, and again on the Friday, Saturday, Sunday and Monday following the first Thursday of the month.

I've already got the first Thursday scheduled. Is there a way to schedule the other days. I haven't been able to find any documentation on how to do it, if it is possible. And I've looked at the sp_add_jobschedule to noavail.

Any help would be much appreciated. Even if it is telling me it can't be done.

Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2007-11-15 : 11:11:19
I would schedule it every day then have a stored proc to calculate whether it needs to do anything or not.
That step can raise an error if it does not need to run and the job set to quit with success on error of that step.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

dataguru1971
Master Smack Fu Yak Hacker

1464 Posts

Posted - 2007-11-15 : 12:41:43
quote:

I've already got the first Thursday scheduled. Is there a way to schedule the other days. I haven't been able to find any documentation on how to do it, if it is possible. And I've looked at the sp_add_jobschedule to noavail.


I agree with NR but you can also go into the server agent properties for the job through EM and set up any number of individual schedules within the same job under the schedule options, but it makes more sense to have it run every Thurs to Mon and have a proc to determine if it actually needs to run or not.





Poor planning on your part does not constitute an emergency on my part.

Go to Top of Page

mdubey
Posting Yak Master

133 Posts

Posted - 2008-05-26 : 21:21:08
How would you setup a meeting with your boss first thursday of every month. The same scheduler you can do it in SQL server Job as well.



Manoj
MCP, MCTS
Go to Top of Page
   

- Advertisement -