making a sproc wait for a period, and rescheduling a job in a sproc.

  • my sproc has to move files from share A to share B. occasionally, the files wont be on the share when the sproc runs. to deal with this i want to do one of two things :

    1. put a function in the sproc that causes it to wait 10 minutes and retry to copy the files , with a max retry times of 3

    or

    2. place the sproc in a job, and reschedule the job for 10 mins time, if the files are not present when the sproc runs first.

     

    How would this be accomplished

  • Check out WAITFOR in BOL

    SQL guy and Houston Magician

  • I would simply place the sproc in a job and set the retry interval to 10 minutes and the number of retrys to however many retries you wish.  This can be found in the Advanced Tab of the Job Step.

     

    HTH

    Carl

  • thanks Carl. best suggestion ever!! should have known myself, but was looking for a complicated solution. couldnt see the forrest through the trees!

Viewing 4 posts - 1 through 3 (of 3 total)

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