Have been trying desperately to get an agent I have setup to run once per hour, each hour.
The agent is designed to send an email once per hour, each hour of the day. However I have not been able to schedule this agent to run as described, once per hour each hour.
Any ideas?
Subject: LEI lets you control agent execution intervals more precisely.
Subject: How to get Agent to run once per hour
Mario,
Agents can’t be made to run at an exact time every hour. You just set them to run once every hour between a start and an end time.
For example, if you set your agent to start at 9 AM and run once every hour, it will kick off around 9 AM unless there are other agents still running and you are over the maximum # of concurrent agents setting in the server doc. If it runs to completion in seconds, then it will kick off again around 10 - 10:05 AM. But if it kicks off at 9 AM and takes 30 minutes to complete, and therefore does not finish until 9:30 AM, then it will wait an hour from that point, and will run again at 10:30 AM.
The only way to try and force the agent to run close to an exact time every hour would be to average the length of time the agent takes to complete, and subtract that from an hour (assuming it is less). So in the above example, if an agent kicks off at 9 AM and runs for 30 minutes, then set the agent to run once every 30 minutes instead of every hour, and the next time the agent will kick off will be 10 AM instead of 10:30 AM.
Just make sure you pick the right server to run the scheduled agent on when adjusting the agent properties, or it won’t run at all. If you develop on a test server and the scheduled agent runs fine there, after you refresh the design on the production server, you have to go into each scheduled agent and change the server it runs on, to the production server.
Ken
Subject: RE: How to get Agent to run once per hour
The big problem is that the agen begins running but never stops. The agent is designed to send an email, I have it scheduled to run hourly, all-day. It starts running immediately and never stops. It floods the mail gateway with thousands of emails all day. I was hoping I could get it to just send one message every 60 minutes.
Any ideas?
Subject: RE: How to get Agent to run once per hour
The agent will send all of the mail it’s coded to send – you can’t use the schedule to control that. If it’s sending out more than one message, then you’ve coded it incorrectly.
Subject: RE: How to get Agent to run once per hour
Yeah – I’m guessing that it’s been set up to run on “all documents” so it’s sending an email for each document in the database, each time it runs.
Subject: RE: How to get Agent to run once per hour
You can take care of this by keeping a record when the mail was sent (say in a profile document), have the agent run more frequently and check if it is time to send email or not.