Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to create custom schedule for sql server agent job Expand / Collapse
Author
Message
Posted Monday, December 1, 2008 2:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 23, 2009 8:19 AM
Points: 4, Visits: 55
Hi everybody,

this is my first post and I searched for a soluten but unfortunately couldn't find one.

I'm in the process of developing an ssis package that exports data into some text files that will be consumed by an other application. Creating the package and running it seems to be no problem.
I also managed to let the package being run by sql server agent on a schedule.

My problem is that the package (creating the files with the exported data) must run every month on the 3rd work day. This 3rd work day also depends on the holidays in that specific month. There is nothing as a work day I can select in sql server creating a schedule for a job.
Has anybody an idea how I can creata a custom schedule in sql server? Do I have to write an application that calls my package or sql agent job?

Thanks in adavence.
Armin
Post #611084
Posted Monday, December 1, 2008 9:24 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Sunday, September 14, 2014 3:17 PM
Points: 1,118, Visits: 2,224
You can implement this with a script task. The script task can be run at the end of your package execution and it will use the SQL Job Agent API to setup next job execution day/time. Check this script for ideas how to manage the SQL Job Agent with the API.

---
SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

Post #611429
Posted Tuesday, December 2, 2008 6:10 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 23, 2009 8:19 AM
Points: 4, Visits: 55
Hi!

Thanks for your reply. I will give it a try.

I tried by directly modifying the entries in [msdb].[dbo].[sysjobschedules] but that didn't bring the expected results.

Armin
Post #611994
Posted Sunday, August 5, 2012 12:45 AM


Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, September 1, 2014 5:33 AM
Points: 6, Visits: 102
See if this helps
http://sqlactions.com/2012/08/05/how-to-create-custom-schedule-for-sql-server-agent-job/


Prashant
Check out my blog at http://sqlactions.com
Post #1340238
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse