How to have a SQL Agent job restart upon completion

  • I have an SSIS package that uses a file watcher task to import data when a file is dropped into a specific directory. This part is working great. The problem is that a new file is dropped every 3-5 minutes and needs to be processed immediately. I don't want to put an infinite loop in my SSIS package - I've read about memory leaks caused by doing this. I plan to execute this package from a SQL Agent job.

    My problem is that I don't know how to have this job restart itself. I want the file to be processed and immediately have the package watching for a new file.

    Any suggestions or ideas?

    Thanks,

    Kim

  • I've never used the File Watcher task, but couldn't you just schedule the job to run every 1 or 2 minutes? You'd get failures when the job was already running, but I would think that would be acceptable

    The other option is to have a second step on job that starts another job using sp_start_job and that job restarts the File Watcher job using sp_start_job.

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply