Test, fail, wait-a-while, test again

  • Hi, I want to test whether somethin is true (in this case that a date column has been updated with a date greater than some other date).

    If false is returned I want the script to wait for five minutes and then test again.

    This is to continually test at five minute intervals until the test returns true and then something else happens and the programme finishes.

    Any ideas will be gratefully received.

    Thank you all in advance,

    Duncan


    All the best,

    Duncan

  • You could either use a job to run every 5min or a sproc with WAITFOR DELAY.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Lutz hi, thanks for the response.

    It has to be an SP, so I'm going to research your suggestion of WAITFOR DELAY and see what transpires.

    Thanks.


    All the best,

    Duncan

  • WHILE TestIsFalse

    BEGIN

    MoreLogicHere

    WAITFOR DELAY '00:05:00'

    END

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

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