NAV 2017 CU 14 : Task Scheduler Problem

mcorvaisier
Member Posts: 19
Hello,
I just made a migration from 2015 to 2017 and I have a problem with job queues entries.
My service is set up like this (services picture) :
In NAV, my job queue run once and after the job status is automatically "On Hold"
My Job is a reccurent job with a next execution time (job queue picture) :
I think the problem is in the codeunit 453 , there is a function for schedule the task.

Before schedule the task, program check if a record with the job queue entry record id exist in the system table "schedule task"
And the record is always find but there is nothing in the data table.
It seems like, the program find the current job queue entry task.
BUG Microsoft ?
Someone can help me ?
Thanks a lot.
I just made a migration from 2015 to 2017 and I have a problem with job queues entries.
My service is set up like this (services picture) :

In NAV, my job queue run once and after the job status is automatically "On Hold"
My Job is a reccurent job with a next execution time (job queue picture) :

I think the problem is in the codeunit 453 , there is a function for schedule the task.

Before schedule the task, program check if a record with the job queue entry record id exist in the system table "schedule task"
And the record is always find but there is nothing in the data table.
It seems like, the program find the current job queue entry task.
BUG Microsoft ?
Someone can help me ?
Thanks a lot.
0
Best Answer
-
CU 15 fix for this issue:
+------------------------------------------------------------------------------+ | OBJECT Codeunit 453 Job Queue - Enqueue | +------------------------------------------------------------------------------+ ---------- Before (BEFORE) ---------- Codeunit 453 ---------- Function EnqueueJobQueueEntry IF DoNotScheduleTask THEN EXIT; - JobQueueEntry."System Task ID" := JobQueueEntry.ScheduleTask; - IF NOT ISNULLGUID(JobQueueEntry."System Task ID") THEN BEGIN - JobQueueEntry.Status := JobQueueEntry.Status::Ready; - JobQueueEntry.MODIFY; - END; COMMIT; END; ---------- After (AFTER) ------------------------------------------------------ IF DoNotScheduleTask THEN EXIT; + JobQueueEntry."System Task ID" := + TASKSCHEDULER.CREATETASK( + CODEUNIT::"Job Queue Dispatcher", + CODEUNIT::"Job Queue Error Handler", + TRUE, + COMPANYNAME, + JobQueueEntry."Earliest Start Date/Time", + JobQueueEntry.RECORDID); + JobQueueEntry.Status := JobQueueEntry.Status::Ready; + JobQueueEntry.MODIFY; COMMIT; END; --------------------------------------------------------------------------------
Cheers
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.5
Answers
-
You are almost right. The function is in Table 472 "Job Queue Entry" and the checking code was added in one of the last CUs. And indeed, the entry is still there, so no reschedule occurs for recurring tasks.
We did a quick fix by extending the filter in HasSheduledTask() (where, by the way, the name of the function is also wrong):ScheduledTask.SETRANGE(Record,RECORDID); // BUGFIX++ ScheduledTask.SETFILTER("Not Before", '%1..', "Earliest Start Date/Time"); // BUGFIX<< EXIT(NOT ScheduledTask.ISEMPTY);
Not sure how this was intended to work behind the scenes, and what this fix was for, but it works for now until we get an official change.
Cheers
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.0 -
I change my statement above: We have now also completely removed the code, because there might be a chain reaction with the same categories, which had the same negative effect.Cheers
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.0 -
CU 15 fix for this issue:
+------------------------------------------------------------------------------+ | OBJECT Codeunit 453 Job Queue - Enqueue | +------------------------------------------------------------------------------+ ---------- Before (BEFORE) ---------- Codeunit 453 ---------- Function EnqueueJobQueueEntry IF DoNotScheduleTask THEN EXIT; - JobQueueEntry."System Task ID" := JobQueueEntry.ScheduleTask; - IF NOT ISNULLGUID(JobQueueEntry."System Task ID") THEN BEGIN - JobQueueEntry.Status := JobQueueEntry.Status::Ready; - JobQueueEntry.MODIFY; - END; COMMIT; END; ---------- After (AFTER) ------------------------------------------------------ IF DoNotScheduleTask THEN EXIT; + JobQueueEntry."System Task ID" := + TASKSCHEDULER.CREATETASK( + CODEUNIT::"Job Queue Dispatcher", + CODEUNIT::"Job Queue Error Handler", + TRUE, + COMPANYNAME, + JobQueueEntry."Earliest Start Date/Time", + JobQueueEntry.RECORDID); + JobQueueEntry.Status := JobQueueEntry.Status::Ready; + JobQueueEntry.MODIFY; COMMIT; END; --------------------------------------------------------------------------------
Cheers
Carsten
==> How To Ask Questions The Smart Way
This post is my own opinion and does not necessarily reflect the opinion or view of my employer.5 -
Thanks0
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