Hi everyone,
In our team we are facing an issue with "Job Queue Entry" and "Task Scheduler": Every process enqueued in the "Job Queue Entry" is executed only once even if it's scheduled to execute more than once. The first time it runs only when the service associated with the task scheduler is starting or restarting.
Here is an example of my workflow to better explain the situation:
(Initial situation - Service 1: client enabled and task scheduler disabled + Service 2: client disabled and task scheduler enabled)
- I create a "Job Queue Entry" record to run a custom codeunit (50k range) scheduled every day and every minute.
- I set the record status to "Ready" but the row is not executed. I also checked in the "scheduled task" table the existance of the task row.
- So i restarted the service 2.
- The enqued process is executed and rescheduled a minute later (as planned). I checked again the "scheduled task" table.
- The process doesn't executes anymore unless i restart again the service 2.
Things you might ask me:
- Are the services in the same server? Yes. In this server there are more than 2 BC services, even linked with other databases that run every "Job Queue Entry" without problem.
- Is the task service configured correctly? Yes. Enabling the client in the service 2 works fine.
- Is the codeunit running correctly by developer? Yes. This is a test codeunit that just create a log record in a table. (We don't have license problem in this object)
- Have you tried to recreate the service? Yes.
- Have you tried scheduling other jobs or other codeunits? Yes.
- Have you customized some code in the MS objects? No.
- Have you tried to edit some field in the "Job Queue Entries"? Yes, but none changed the behavior.
Anyone has some advice?
Thanks
0
Answers
Did you try the latest CU?
Did you check the event viewer on the machine where the Nst is running with Task Scheduler enabled?
Did you try to disable the Task scheduler everywhere and then use a dedicated Nst only with Task Scheduler enabled?
Something else to try: attach debugger to it to trace the AL code
We can't try the latest CU because we are in production environment, but maybe we will copy this db and try to test these processes in a isolated environment.
In the server the event viewer doesn't show anything usefull about it.
The task scheduler and the client are already working in two dedicated services.
I've tried to attach a debug session to the task scheduler service but i can't see any other session starts. (By the way our code is running still in C\AL).