Job Queue Entry stays in progress

We are using a codeunit in the classic client of NAV5 SP1 which scans a folder for files. When a file is found it is read and checked for a specific content. Then the file is moved to another folder.
When running the codeunit manual everything works fine.
When using an open client to run the codeunit through a timer form everything works fine too.
When running the codeunit through the Job Queue the entry stays in progress. The Job Queue Log Entry gives no error message.

I hope somebody can give me a hint.
Thanks in advance.

Best Answer

Answers

  • JasonJason Member Posts: 8
    Job queue is running by NAS. You can check whether the account that running NAS has proper permission to access the folder. It may cause job queue is always running if permission issue.
  • elwin68elwin68 Member Posts: 153
    The account has proper permissions to access the folder.
  • JasminkaTJasminkaT Member, Microsoft Employee Posts: 34
    If NAS encounters a deadlock, it will restart, this is expected behavior. However the job queue that was in process remains with status InProcess after the restart, but has in fact to be re-started manually after NAS restart
  • elwin68elwin68 Member Posts: 153
    One ERROR command was still in the codeunit without using GUIALLOWED. I overlooked this completely.
    Thanks for sending me in the right direction.
  • KishormKishorm Member Posts: 921
    ERROR statements shouldn't cause a problem and you shouldn't wrap them round IF GUIALLOWED because you still want the error to occur.

    What I was actually referring to was the use of variables of type "Dialog" e.g. showing progress information - this can cause problems/hanging and these should be wrapped around an IF GUIALLOWED
  • elwin68elwin68 Member Posts: 153
    The codeunit had no variables of the type 'dialog' in it only one ERROR-statement. After removing this statement the job queue was running correctly and don't stay inprocess anymore.
Sign In or Register to comment.