Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to create custom schedule for sql server agent job


How to create custom schedule for sql server agent job

Author
Message
armin.mueller
armin.mueller
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
CozyRoc
CozyRoc
Ten Centuries
Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)Ten Centuries (1.2K reputation)

Group: General Forum Members
Points: 1152 Visits: 2235
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/


armin.mueller
armin.mueller
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
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
sqlactions
sqlactions
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 133
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search