How to get scheduled agent properties / settings

I would like to develop an agent that could run on any databases, this agent would get all information related to scheduled agents :

  • schedule (daily, weekly…)

  • on which day it should run and at what time

  • what are the restrictions

  • etc.

Note: I don’t have admin rights, I know that is possible to get all agents that are scheduled to run on a specific server, that’s not what I’m expecting, all I want is which agents are scheduled on a specific database and all properties related to each of these agents.

Any suggestions would be appreciated.

Subject: How to get scheduled agent properties / settings

Hi.

This is a sample to enable (or disable) an Agent by running another agent.

Set agt = dbMail.GetAgent(“Update Tasks”)

agt.IsEnabled = True ’ or maybe False

Call agt.Save

By checking/setting further agent properties you should be able to create an agent that fits your requirements…

I think, in your case, you should get all availabe agents of a specific (current) Database at first, then loop through the list.