Hi:
I have a NAS application that uses timer-based logic to run a codeunit once a day. The codeunit ran for 3 or 4 days after being started. Then, the codeunit failed to run after that.
Stopping the NAS service and restarting it fixed the problem - the codeunit ran at the next scheduled time.
There were no application log entries during the time that it stopped processing.
Has anyone encountered this type of problem, and what have you done to work around or through it? Do you restart the service every day? Since the NAS service is started but not doing anything, has anyone built any sort of programming that would notify someone that it is NOT doing what it is supposed to?
Any suggestions would be appreciated.
Ron
Ron
0
Comments
In some critical places in the code, you can create a new record with some info about it (E.g. "Processing Item "1000"). Of course those records will be record, so only do this if your transaction are short (max. a few seconds) or just before a COMMIT.
Of course you must make sure you don't create MORE log-records than that you insert/modify/delete other records.
And of course you need a routine to delete those records again after some days.
Another way is to write in the event-log using MESSAGE. But this can overcrowd the event-log.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
I thought about this, but I really believe that NAS is not calling the codeunit at all. The codeunit extracts records from an external system and inserts those records into an import table in NAV and timestamps each record with the time of the import. Our import table was just empty. If the source database was unavailable, I'd expect an error to be logged.
Somewhat of a mystery...
make a command-file to run the NAS without a service. As one of the parameters, you can put debug. This will start the debugger while running the NAS.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!