I need to create a package that will monitor a table in a source system and when a flag is set, load data from other tables in this source system to my destination system. Today this is accomplished with a SQL Agent job that executes every 15 minutes. If there is no work to do the job simply exits. I would like to create a SQLIS package that checks this control table every 30 seconds. Can I create a package that runs continuously

Continuously Running Package
mike101011
mmDamonCarr
Jacob_I
James Blevins
Anders Ljusberg
s441
Simon - you are describing two very different solutions here:
1) a task that fires event that is configured to run some work
Note that if the folder is local you can use WMI task for this. This is a reasonable approach, although pulling for data means you are spending CPU cycles every N seconds - usually not good solution. Doing anything only when needed (e.g. WMI task or SQL trigger) is usually better. Also I'm not sure if making this code a task that fires an event saves you any coding compared to simply directly running the package from the same code.
2) data source that continuosly adds rows to a buffer
This is more tricky. First, if you have asynchronous transform like sort in the data flow you will get no output until the source tells that it had read all the data. The data will be accumulated by sort transform in this case, waiting for source to stop. Probably not what you want.
If you don't have any asynchronous transforms, the things are a bit better, but one may still find some surprises. E.g. user might expect that once the source component processed a file, all rows from this file reach destination in some finite amount of time. But this is not always true - the data flow processes full buffers. So if source file did not fill the buffer exactly, part of it will not be sent to transforms until new data from the next file fills this buffer.
Hoahai
For example having a source component that monitors a folder share would run continuously and when a file is received it either fires and event or processes the file i.e. adds rows to a buffer.
The good thing about doing it that way is that you don't have to write a service and all the code is in one place.
Ian Mellors
I can't use a trigger because I don't have control over the source system where the control table is. I have to query the control table every 30 seconds.
-Darrell
the Wolf
You can have a package that runs continuously:
Create an Loop task, use some variable (initially true) as loop continuation condition. Inside the loop:
You can also stop such package from Management Studio - connect to local SSIS service, find the package under running packages, right-click, select Stop. You can omit the third step if you are ok with this method.
But as others suggested, you may first try to use other approaches.
Christian Wade
Andrea Solari
Roland2
Continuously running packages are probably not a good idea. You could use a trigger, and from the trigger call the SQL Agent job to execute the package as and when necessary when the flag is set.
Donald
HarryLarry
Kumar Abhishek
I appreciate the asynchronous issue and I would only want this to process complete chunks of work, i.e. not leave anything incomplete for a subsequent run.
The impression I got from Donald was that having a package running this way will have problems. Could understand if SSIS had a memory leak, which I am sure hasn't ;) (anymore anyway).