How do I create an agent that only runs every 6 months

25 pts.
Tags:
Agents
Lotus Schedule Agent
Hello, I want to create an agent in the Public Address Book, that checks every person document and if the person has been there for over 6 months it emails them. I don't really want to modify the design of the person document to create a hidden field, as it is the address book. Has anyone any suggestions on how I can do this? I thought about using the creation date, but after the first 6 month period the email would be sent to them every month (you can only set up agents to run each month on schedule). Thanks, Sartz

Answer Wiki

Thanks. We'll let you know when a new response is added.

Your agent could reside in a separate database, and could create a small doc for each user in the PAB, including the user name, person doc creation date, and notice mailed flag or date. It could then periodically scan a view of those who haven’t been emailed, check dates, and mail as appropriate.

If for some reason the agent must reside in the PAB, it could be done there, but there are a lot more gotchas if you do that – notably having to do with design updates.

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • SlikTool
    Your questions says - "how to create an agent to run every 6 months?" Do you mean you want it to run more regularly, but maintain a date for each record and process each every 6 months? Or, an agent that runs say on Jan 1, and then June 1 and that is it? Mike K.
    1,840 pointsBadges:
    report
  • Sartz
    Thanks Mike, Good question. I really only need it to run on Jan 1 and then June the 1.
    25 pointsBadges:
    report
  • SlikTool
    Of course, I assume the Agent will be in Lotus Script, but doesn't have to be. Setup the agent to run monthly on the first. At the very beginning of the code add the following, it will determine if it is the 1st month or the 6th month, and if it is, then the agent will run, otherwise the agent will not run. Obviously you should change the month numbers to suit your actual needs. Dim cdt as New NotesDateTime(Cstr(Now())) if Month(cdt.lslocaltime) = 6 or Month(cdt.lslocaltime) = 1 then 'put nothing but this comment here - the code will run else exit sub 'or you could put end as well, either would work End If 'the rest of the agent code goes here and below Mike K
    1,840 pointsBadges:
    report
  • Sartz
    That's great! Thanks Mike.
    25 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following