If you are unable to create a new account, please email bspsoftware@techdata.com

Author Topic: Stop agent when condition is met  (Read 4695 times)

Offline kgcognos

  • Community Leader
  • *****
  • Join Date: Oct 2013
  • Posts: 100
  • Forum Citizenship: +0/-1
Stop agent when condition is met
« on: 24 Aug 2018 08:09:59 am »

I just want to check instead of using triggers, is there a way in event studio to stop the agent from executing reports once the condition is met?
My agent will run every hour. It will check if a database run flag is set to Y and date is today only then it will execute all tasks. But once it already ran for the day, I don't want it to execute the tasks again.

Thank you in advance. 

Offline BigChris

  • Statesman
  • ******
  • Join Date: Apr 2013
  • Posts: 1,270
  • Forum Citizenship: +91/-0
Re: Stop agent when condition is met
« Reply #1 on: 04 Nov 2020 12:27:20 am »
Depends on what you're allowed to do in your environment. One solution might be to create a stored procedure that writes back to the database with a record/flag that the reports have been run - then have your event check for that flag. Have the stored procedure at the end of the report run.