Hi, we have observed strange behaviour of the TaskScheduler on NAV2017 NSTs:
- By default - periodical tasks are not rescheduling and stay in InProcess status without executing the code - probably it happens when the Task Group is set to some value.
- Hotfixed - when remove the test HasScheduledTask, it works, but the tasks are run on each NST (e.g. every 10 minutes are processed 10 times) after service restart ...
Thx
Comments
xStepa
Perhaps the original problem was not with scheduling code, but somewhere else. Maybe scheduled code did not exit cleanly, maybe you should add CANCELTASK at the end of the scheduled object to make sure that scheduler session does not hang around, etc.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
On which Cumulative Update are you running NAV 2017?
We have trouble with tasks stuck on status 'InProcess' without any session active for the task too. I hope this issue is resolved in NAV 2017 CU15 (platform fix).
It would make sense that the current work-around suggested by Juhl works.
I would expect that the issue is resolved when you're using CU 15 or higher. I'm really curious if this is true.
xStepa
In NAV2017 CU 16 (application) there is a change for the task scheduler too. Might be worth a try to port back this fix in your application if you haven't already.
xStepa