question

apple avatar image
apple asked

Scheduling an SSIS package to run on specific days.

Hi! I need to schedule an SSIS job that runs weekly on Sunday night but for the last week it needs to run on that day either 30th or 31st. For example this month Aug 31 st is Monday so it should run on Monday instead of Sunday. Appreciate the help Thanks a lot.
sqlssis
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dave_Green avatar image Dave_Green ♦ commented ·
Can you expand a little on the rules - for example, if the 31st is a Saturday, should it not run on the 26th (the previous Sunday) and run on the 31st, then again on the 1st (being the first Sunday)? (Also, can I assume we're talking of SQL Server Agent being used to schedule the job?)
0 Likes 0 ·

1 Answer

·
Alvin Ramard avatar image
Alvin Ramard answered
If you can write a query that can check if any given day is a day that it should run, then you could try and create a job with no schedule to run your package. Every day, run the query that checks to see if this is a day the package should run. If so, start the job I mentioned above. If not, do nothing.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

apple avatar image apple commented ·
Thank you Yes we are using SQL Server Agent to run the job . If it is close to the month end it should not run so it will not run on 26 th but on the 31 st. It will not run on the 1 st but should be scheduled to run the following Sunday after 1 st so it will run on Sep 6th . Alvin : Appreciate if you have any example Thanks
0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.