Update task

I don’t see that the Update task is running on our server and have one particular database that I want to be sure is updating frequently. The documents in the database are refreshed every 15 minutes from an Access database. The view is set to Refresh Automatic and Refresh Display. I created a Program document to run every 10 minutes. The Program is Update and the command line is apps\MRP NewTemp.nsf.

I can see in the log that it says:

04/17/2009 10:37:15 AM Running Program document for ‘Update apps\MRP NewTemp.nsf’

04/17/2009 10:37:15 AM Index update process started

But, my view that I’ve kept up on my screen in the MRP NewTemp database is not refreshing. I try to open a document and it says Document has been deleted.

Any ideas?

Thanks

Subject: Update task

What happens if you run the command directly in the server console? I am not sure that space in the middle is supposed to be there.

Subject: Update task

What happens if you run the command directly in the server console? I am not sure that space in the middle is supposed to be there.

Subject: RE: Update task

When I run it from the console, it see the same message as in the log:

Index update process started

It doesn’t appear to post anything after that, though. I tried Updall instead and it did error on the file name. I put the path/database name in quotes and the updall did work. The quotes didn’t seem to do anything different with the Update command, though. But, I will look further into that.

Thank you.

Subject: RE: Update task

It should say something more.(Specially something like updall process shutdown) Can you try to rename the database (Maybe make a copy) and test the following command?

load updall -R apps/databasenames.nsf -t ViewName

See that there is the -R and -t options which will re-create the indexes (-R) and it has an option to only refresh a certain view (-t) so the process will take shorter to complete.

If that works, you can make a a program document to run the command or maybe a Scheduled task in windows. You need to run this…

nserver.exe -c ‘load updall -R apps/databasenames.nsf -t ViewName’

The -c option will send the command to the server like if you were putting the input in the console itself. I don’t remember if you can put the command server in a Lotus program document.

Hope it helps.

Subject: Update task

Here’s another approach: instead of manipulating the update server task, use the code that creates records from Access. At the end of the update, call the ‘refresh’ method of NotesView to force the backend view to update.

I also wonder, based on your comment about the document being deleted, if the refresh code you are using might be deleting all or many records, then re-creating them? If so, it would be a good idea to re-think your approach as this will become inefficient over time.

hth

Subject: RE: Update task

I could try to use the view.refresh in the code instead to make it more immediate.

It is true that the code is deleting all records and re-creating them, but unfortunately it can’t be guaranteed that the documents have unique keys in order to be able to compare what has changed and only update or add/delete a few.

Thanks for the suggestion.