Job Queue Error

beyrem
Member Posts: 10
Hello,
I have an issue with the Job queues.
In fact in case of error (exple : parameter missing or non authorized validation dates ) the status of the Job still "In Process" after job is finished, and is not reset to "Ready".
Also in case of error, even if the missing parameters are corrected the job still give the same last Error, i have to run manually the job for once, then next time it runs correctly with the NAS.
Does any one noticed this problem? Thanks for your help.
Best Regards.
I have an issue with the Job queues.
In fact in case of error (exple : parameter missing or non authorized validation dates ) the status of the Job still "In Process" after job is finished, and is not reset to "Ready".
Also in case of error, even if the missing parameters are corrected the job still give the same last Error, i have to run manually the job for once, then next time it runs correctly with the NAS.
Does any one noticed this problem? Thanks for your help.
Best Regards.
0
Comments
-
This is standard behaviour. If the codeunit or report cannot execute completely, then the task status will show "In Progress" and won't be changed automatically. You could add code in codeunit 1 (function NASHandler) to set all "In Progress" tasks to "Ready", when the NAS is restarted.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
-
Thank you Luc,
I have an additionnal question about this issue :
When I see the codeunit 448 (function 'Handlerequest' (standard)):
WasSuccess := CODEUNIT.RUN(CODEUNIT::"Job Queue Start Codeunit",JobQueueEntry);
IF WasSuccess THEN BEGIN
IF JobQueueEntry."Recurring Job" THEN BEGIN
JobQueueEntry."No. of Attempts to Run" := 0;
JobQueueEntry.Status := JobQueueEntry.Status::Ready;
IF NOT JobQueueEntry.MODIFY THEN
JobQueueEntry.INSERT;
END;
END ELSE BEGIN
IF JobQueueEntry."Maximum No. of Attempts to Run" > JobQueueEntry."No. of Attempts to Run" THEN BEGIN
JobQueueEntry."No. of Attempts to Run" := JobQueueEntry."No. of Attempts to Run" + 1;
JobQueueEntry.Status := JobQueueEntry.Status::Ready;
IF NOT JobQueueEntry.INSERT THEN
JobQueueEntry.MODIFY;
END;
I understand that even if the status is not Success (Error) the job should also be at status "Ready".
Is my understanding right ?
Thank you for your help.0 -
I have never used the "Maximum No. of Attempts to Run" and "No. of Attempts to Run" fields. If the codeunit cannot run due to a wrong number of parameters, I doubt if the return value is set to FALSE and that codeunit 448 continues the processing.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions