Got a bug in my Out of Office agent. I updated my agent today and errantly placed my departure date as 2/20/2003 instead of 2/20/2004. In enabling the agent, somehow the server didn’t wait until the nightly agent runner task to execute, and it sent mail out to apparently anyone that had ever sent me an e-mail since 2/20/2003.1. Why did the agent execute immediately instead of being updated and implemented during the nightly task?
Why did it go back through whichever view it did and send e-mail to every person that had e-mailed me vs. responding to new incoming mail w/the incorrect departure date?
Good questions! This is the way it has always been.
Q1 Whenever you enable an agent, it always runs immediately, and then follows the schedule. That is the way it is.
Q2 There really should be some field validation or prompt to warn the user that the from date is in the past are they sure?? We have had problems with this over the years.
What I don’t understand is why it sent an out of office message to every user that sent messages on the past year?It supposed to fire the agent only when a new email arrives, am I right?
Not exactly. It’s a scheduled agent, but isn’t triggered when new mail arrives. By default, it’s scheduled to run every 6 hours. It must look at the starting date of the ooo profile and check to see what documents it hasn’t acted upon yet.
This is actually a fairly common problem, as users will surprisingly often set their departure date in the previous year, especially when typing it in manually at the beginning or end of the year. I agree that you’d think that the ooo dialog would have a confirmation prompt in it, like the calendar does when you create an appointment in the past.
To solve the problem I did some modification to the mail50.ntf template design. If the user try to enable or save the out of office document with a leaving date as yesterday, it will be prompted to change since it’s not allowed.I hope this helps
Adalton
Form: “Out Of Office” - Code was added to declaration section of the form. Right after the line showing
Set Me.m_dtNow = New notesdatetime(Now())
add the following code:
If Me.m_dtFirstDayOut.Timedifferencedouble(Me.m_dtNow) < 0 Then