SlikTool
1220 pts. | Aug 5 2009 5:34PM GMT
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.
Sartz
25 pts. | Aug 10 2009 9:42PM GMT
Thanks Mike, Good question. I really only need it to run on Jan 1 and then June the 1.
SlikTool
1220 pts. | Aug 12 2009 1:27AM GMT
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






