Sometimes we need to delay task in SSIS and there is no simple way to do it. In this article, we will show a simple free task to do it. We will delay 1 minute a task and then we will show how to delay until a specific day and time.
Prerequisites
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:- SSIS designer installed. Sometimes it is referred to as BIDS or SSDT (download it from the Microsoft site).
- Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.
- Make sure ZappySys SSIS PowerPack is installed (download it, if you haven't already).
- (Optional step). Read this article, if you are planning to deploy packages to a server and schedule their execution later.
How to delay SSIS tasks using SSIS Timer Task
- In order to solve this problem, you need to download this free tool and use it. ZS Timer task does not require too many explanations to use it. It is simple. You just specify the time to wait.
- Secondly, we will have a package like this one:
- Also, we need to wait 1 minute in order to have everything ready for the
execution of the next package: - Finally, it is possible to wait days, hours, minutes and seconds.
Delay SSIS tasks to a specific date
- It is also possible to run the package using the ZS Timer task and execute the timer task to specific data.
- In order to do this we will use the following configuration:
- In this example, the configuration provided will run on June 11, 2019.
- Also, remember to uncheck the option Ignore date part. This option is checked by default and disables the date.
Delay SSIS tasks to a specific time
- The next example will be used to run the task in a customized time.
- First of all, we will configure the time to 13:02:01. This means that the task will run at that time:
- Also, note that by default the ignore date part is checked.
Delay SSIS tasks from a variable
- We will show how to get the date from a variable. We will store the time from a variable and delay the task until the specified date of the variable.
- First of all, we will create a variable of type dateTime:
- If the ignore date part is checked, it will run today at the time specified.
- Otherwise, it will run the date and time specified.
Conclusion
In this article, we show how to delay SSIS tasks a custom number of days or at a specific date or time. We also learned how to set the date and time manually or using a variable.