This is one of those “little” things that’s a glitch, and I have gotten used to in the agent manager. I don’t know if it’s considered a bug, and I think I have read all over the FAQs and agent articles without finding a helpful answer. It always bites me just often enough to be irritating but not often enough to remember to take time out and look for a solution.
You have a scheduled server agent that runs Daily. It runs at, say 11 PM.
It’s 10:20 AM and you want to reschedule this agent to run at 9:00 PM so it finishes sooner.
You open the agent in Designer, change the run time to 9:00 PM and save it.
Expected result : the agent will run at 9:00 PM
Actual result: the agent starts running on the server at 10:21 AM just as you save it. I think it will also run at 9:00 PM.
Am I crazy or I forgot the FAQ answer?
I might be lying - it could be that it only happens if the scheduled time is within an hour of the current time or some other factor that I didn’t describe properly in my test case. But I do remember this happening.
Subject: Schedule a Daily Agent - How to prevent it from running immediately on save?
I often put a poison pill in my agents so that if invoked outside a given time period they just exit. I don’t know why agents behave that way or if there is a better way to prevent the undesirable behavior you describe.
Subject: RE: Schedule a Daily Agent - How to prevent it from running immediately on save?
It’s not a bug, it’s a feature. And if I remember right, it is even mentioned in one of the agent FAQs.
There is a notes.ini variable to control this behavior, but neither do I remember off hands, what the exact name is, nor am I sure if it is already supported in 6.5.5. You should however be able to find it in developerWorks and I think even in this forum.
Subject: Schedule a Daily Agent - How to prevent it from running immediately on save?
I don’t experience the same as you. If the agent is set to run at a later hour than the time I save it then it does not run until that later hour. However, if the agent is set to run at an hour that is earlier then the time I saved it then it does run. This is because the last scheduled run time in the agent log gets cleared so it thinks it never ran that day at it’s scheduled time. Maybe the diff is our server versions as I am not on the same as you. It’s worked as I described with 6.5.3FP2 and 7.0.3 that I cn recall.