6 Replies Latest reply: May 15, 2014 10:00 AM by shard01 _ RSS

    Stop/Cancel A Job

    joey

      I recently discovered how to raise an alert in Data Pump scripting.  This is useful for sending myself an email notification when an external command line (for example a batch script) times out.

       

      I am very excited about this, because tracking down hanging batch scripts has been very time consuming.

       

      However, I see that even though I am raising an alert, processing continues as normal.  The user will recieve their report even though the batch script times out.  I would like to stop the job imediately when there is an error such as a batch script time out.

       

      I assume there is a way to do this, but I've not been able to find it in the help manual yet.  Any ideas or examples?  Thanks.

        • Stop/Cancel A Job
          Gareth Horton

          Joey,

           

          Check out  [url="http://mails.datawatch.com/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=10;t=000084"]this[/url] post.

           

          I'll see you at the user conference.

           

          Here's my  [url="http://datawatch.spaces.live.com/"]schedule[/url]

           

          Gareth

           

           

          Originally posted by Joey:

          I recently discovered how to raise an alert in Data Pump scripting.  This is useful for sending myself an email notification when an external command line (for example a batch script) times out.

           

          I am very excited about this, because tracking down hanging batch scripts has been very time consuming.

           

          However, I see that even though I am raising an alert, processing continues as normal.  The user will recieve their report even though the batch script times out.  I would like to stop the job imediately when there is an error such as a batch script time out.

           

          I assume there is a way to do this, but I've not been able to find it in the help manual yet.  Any ideas or examples?  Thanks. /b[/quote]

          • Stop/Cancel A Job
            joey

            Thanks, that did just the trick.

              • Stop/Cancel A Job

                Sorry to revive an old thread but my question goes hand in hand with the original post.

                 

                Gareth's link didn't work for me, and I tried searching, but so far no luck.

                 

                What we would like to do is if a specific process fails, stop the MDP service. This way if a report is not the correct date, we can wait for the report with the correct date to populate and then restart the service.

                  • Stop/Cancel A Job
                    joey

                    return false will stop the process.

                     

                    If Shell("""C:\Script.bat""",AppWinStyle.Hide,True,1800000)<>[/SIZE][SIZE=2] 0[/SIZE]

                       Log.AddEvent("My Script Failed", "MyEvent-BatchScriptFailed")[/SIZE]

                       return false[/SIZE]

                    End If[/SIZE]