Agent Writing

Hi

i want agent that to be run and will archive document that are previous months?

will anybody please help me in agent writing?

Ex if today is 1st nov then oct document should archive?

please help me in this regards

DEVss’’

Subject: Agent Writing

Hi,

Domino is able to do this with a policy. You will have to study this in the admin help. Read the subjects about archive, archive policies and the compact task.

You will have to create a policy where you specify the dates etc and then create a program document running the compact task.

Kjeld

Subject: Agent Writing

If you’re referring to mail, check out policies.

If you’re referring to a custom-built database, please say so - and indicate what is meant by archiving in this context. Are you just trying to hide the document from the main views or are you doing this to save space?

Subject: RE: Agent Writing

Hi Gavin Bollard

thanks for receiving

i mean write agent that should archive the document in the view that are previous month

agent should run monthly, if today is 1 november and today agent will run at 12:00 am clock: and will archive the document of previousely month. and there is selection formula in the view that will not display the last statsuDoc!=archive

i hope i have explain my self

there is complusory policy to write the agent and but not setting in the administrator side

thanks any help will appericiate

DEVss’’

Subject: RE: Agent Writing

Sounds like you’re not doing anything special with the documents (like moving them to another database) as part of archiving - you’re just changing a field.

That being the case, just create an agent Triggered on Schedule with Schedule Monthly, and start on being the 1st of some month.

Target - all documents in the database.

Document selection being.

LastMonth := @Adjust(@Now;0;-1;0;0;0;0);

@Created < LastMonth

(Something like that)

Your actions would be Simple Action - something like… change FIELD (archivestatus = true).

The agent will get progressively slower, so you may want to adjust the selection to…

LastMonth := @Adjust(@Now;0;-1;0;0;0;0);

Last2Month := @Adjust(@Now;0;-2;0;0;0;0);

(@Created < LastMonth) AND (@Created > Last2Month)

Again… I’m doing this away from a Notesclient so I can’t remember perfectly or test it.

Good luck.

Gavin.