Force Job as Successful

  • Hi,

    I'm looking for a way to force a job to indicate successful. Here's the deal; I run a sql routine hourly to test for jobs that failed. If any fail, it sends an email to our team and continues to send an email hourly.

    After investigating a failed job, I know why it failed and the reason is 3rd party data, which is not available today. So at that point, I need to force the job as successful so that it doesn't continue to send emails. Does anyone have any sql code that would force that result?

    For now, I manually create a new dummy step (last step) in the job, like say select getdate() and then execute that step, which will force the job to be successful.

    Thanks for any ideas on this,

    Paul

  • As far as i know, there is no any way to force the job success. maybe you have to do it by your logical side.

  • I think you could wrap the original call into a TRY ... CATCH block and don't raise an error at the CATCH section.



    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]

  • I also using same to get rid of repeated notification.

  • Paul Bukowski (1/15/2012)


    For now, I manually create a new dummy step (last step) in the job, like say select getdate() and then execute that step, which will force the job to be successful.

    It works, but it's not a "clean" technique. Be sure to document it properly.

    My vote goes to TRY/CATCH.

    -- Gianluca Sartori

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

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