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
IanYou 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|||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.|||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.|||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 ]
}sqlsql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment