How to delay SSIS execution using Timer Task

SSIS timer logoSometimes 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:
  1. SSIS designer installed. Sometimes it is referred to as BIDS or SSDT (download it from the Microsoft site).
  2. Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.
  3. Make sure ZappySys SSIS PowerPack is installed (download it, if you haven't already).
  4. (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

  1. 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.
  2. Secondly, we will have a package like this one:
    Timer task to wait specified time

    Package with SSIS timer task

  3. Also, we need to wait 1 minute in order to have everything ready for the
    execution of the next package:
    Wait in SSIS 1 minute

    SSIS delay task 1 minute

  4. Finally, it is possible to wait days, hours, minutes and seconds.

Delay SSIS tasks to a specific date

  1. It is also possible to run the package using the ZS Timer task and execute the timer task to specific data.
  2. In order to do this we will use the following configuration:
    Wait SSIS task in specific date

    SSIS delay task until a date

  3. In this example, the configuration provided will run on June 11, 2019.
  4. 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

  1. The next example will be used to run the task in a customized time.
  2. First of all, we will configure the time to 13:02:01. This means that the task will run at that time:
    Execute the task in SSIS at a customized time

    Run SSIS task at specific time

  3. Also, note that by default the ignore date part is checked.

Delay SSIS tasks from a variable

  1. 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.
  2. First of all, we will create a variable of type dateTime:
    Set datetime variable

    SSIS datetime variable

  3. If the ignore date part is checked, it will run today at the time specified.
    Using a variable to wait some time in SSIS

    Timer ssis task with variable

  4. 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.

References

Posted in SSIS Timer Task and tagged , , .