简体   繁体   中英

SSIS SQL job scheduling conflict

I've been given the task to schedule 2 SSIS packages (by the way I'm a Jr.Data Analyst and starting to get my feet wet with SSIS). Here is the scenario: I have a package that needs to be scheduled to run weekly at 1pm every Friday (this sends out files to an ouside vendor). Will call this the weekly package. I have another package for the same vendor that needs to be scheduled to run the first friday of every month. Will call this the monthly package. So I have scheduled the weekly package to run every Friday BUT I need the weekly package not to run the Friday that the monthly package will run. Any ideas would be greatly appreciated. Thank You

添加一个运行的“执行SQL”任务:

IF (DATEPART(day,GETDATE()) BETWEEN 1 AND 7 AND DATEDIFF(day,0,GETDATE())%7 = 4) RAISERROR('Skip job on first Friday of month',16,1)

You could make it easy and schedule four jobs. Weeks 1, 2 & 3 would be the weekly package and the 4th would be the monthly package. SQL server agent makes it easy to do this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM