Hi everybody
I have a schedulled agent which runs in the midnight daily. This agent runs without any problem.
But now my client wants to change the schedulled time of this agent to different times in different days.
(I.E. the user should be able to change the schedulled time to 1.00 AM/4.00 AM/ 2PM and so on as they wish.)
The design of this Database is hidden to users.
My client’s is running Notes Systems on R5.
Therefore how could I achive above functionality ???
If I parameterized the schedulled time of the agent, then how can I set the parameterized schedulled time to the agent?
Can I achive this using Lotus Scripts? Or else what I can do?
Hope you can help me!
Many Thx in Advance!
Regards
Rasika
Subject: Programmatically change schedule agents
The NotesAgent class does have the ability to adjust the agent schedule.
You could make the agent via parameters. Make a document in the database which would state what the desire time to run. Then have the agent run “More than once daily…” with some repeat interval. At the start of the agent compare the current time to the time marked on the document. IF the condition is met run the agent otherwise have it exit the agent.
HTH – Cheers – Email in profile.
Subject: RE: Programmatically change schedule agents
Hi Joe,
Thx a lot for the response.
But if the agent runs more than once a day…it will effect for the server performance. It will slow down the server operaion. Do u have any other way.
Thx a lot !
Subject: RE: Programmatically change schedule agents
Explain why it would hamper the server?
If the first portion of the code checks to see if needs to continue. So the agent will not run the entire code multiple times.
Maybe your explaination can help me understand the logic of you resisting it.
Otherwise make more than one copy of the agent and schedule it for the appropriate time.
HTH – Cheer – Email in profile
Subject: RE: Programmatically change schedule agents
Joe’s way is a good one – it shouldn’t take very long for the agent to start up, decide it’s not time yet to run, and exit.
Alternately, if you’ve got LEI, you could use the LEI Scripted Activity functionality to schedule the agent. Create several Scripted Activity records, for different times on different days.
Or, you could move all your agent code into a script library, and create several agents that do nothing but call a function in this script library, with different schedules. Problem then is that each copy has its own set of “already processed” documents.
Subject: RE: Programmatically change schedule agents
Thanks Andre