Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2005
    Posts
    21

    Unanswered: Dts package to run every 10 seconds

    Does anyone know if you can shedule a dts package to run every 10 seconds ?
    I can see that you can create a job but this only has the option for the earliest run set to 1 minute.

    Any advice

    Ian

  2. #2
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    You would probably have to write a batch/script file that runs with some form of a loop that will sleep for 10 seconds, and then exec the packaged via DTSRun within that while loop.

    Question though, why do you need to run this every 10 seconds ?

    Here is a simple batch file that could do it, but you would really need to add some error checking, being it can run endlessly.

    run.cmd file
    @ECHO OFF
    :begin
    sleep 10
    echo DTSRun command goes here
    GOTO END

    :END
    goto BEGIN
    Last edited by PMASchmed; 10-06-06 at 09:36.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Nice batch file.

    You could also do this by having your job (scheduled once per minute) call a stored procedure that executes the DTS package six times in 10 second intervals. Plus, I wouldn't be surprised if there was a way you could rig this up in the DTS package yourself, either using coding or by simply repeating the process six times in a series of linked steps.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  4. #4
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    Quote Originally Posted by blindman
    Nice batch file.

    You could also do this by having your job (scheduled once per minute) call a stored procedure that executes the DTS package six times in 10 second intervals. Plus, I wouldn't be surprised if there was a way you could rig this up in the DTS package yourself, either using coding or by simply repeating the process six times in a series of linked steps.

    This way seems way safer instead of using the .cmd file.

  5. #5
    Join Date
    Jan 2005
    Location
    Atlanta
    Posts
    58

    Waitfor Delay '00:00:10'

    Another alternative is that you could run your
    DTS package as step 1,3,5,7,9, and 11 in the scheduled job,
    with step 2,4,6,8, and 10 being a T-SQL command:

    WAITFOR DELAY '00:00:10'

    See BoL ...

    WAITFOR
    {
    DELAY 'time_to_pass'
    | TIME 'time_to_execute'
    | ( receive_statement ) [ , TIMEOUT timeout ]
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •