Changes in execution time for recurrent job queue entry

gtrennert2
Member Posts: 23
Hello
I created a codeunit with one only code : sleep(180000) meaning the execution time will be 3 minutes
I published on BC Version: FR Business Central 19.2 (Platform 19.0.32956.36014 + Application 19.2.32968.33612)
Then I created a JobQueue Entry for this Codeunit, with "Recurring Job" checked (every day) and "Starting Time" at 13:25
The I set Status to Ready
The "Earliest Start Date/Time" is automatically set to "21/02/2021 13:25"
After the first execution the starting time for the next day the "Starting Time" stays at 13:25
But the "Earliest Start Date/Time" is automatically set to "22/02/2021 13:28"
This means that the execution time will change every day from 13:25 to 13:28 to 13:31 and so on
How can this be avoided - the execution time needs to stay at 13:25
Thanks
I created a codeunit with one only code : sleep(180000) meaning the execution time will be 3 minutes
I published on BC Version: FR Business Central 19.2 (Platform 19.0.32956.36014 + Application 19.2.32968.33612)
Then I created a JobQueue Entry for this Codeunit, with "Recurring Job" checked (every day) and "Starting Time" at 13:25
The I set Status to Ready
The "Earliest Start Date/Time" is automatically set to "21/02/2021 13:25"
After the first execution the starting time for the next day the "Starting Time" stays at 13:25
But the "Earliest Start Date/Time" is automatically set to "22/02/2021 13:28"
This means that the execution time will change every day from 13:25 to 13:28 to 13:31 and so on
How can this be avoided - the execution time needs to stay at 13:25
Thanks
0
Answers
-
That cannot be avoided. The job queue calculate all ways the execution time in it.
What I do mostly in that cases I create a logic app for it.
Or maybe after the report you will reset the date and time in the job queue. But that I'm not sure if that is possible.0 -
Check out this example in the Microsoft docs.
You need to set the earliest starting time in addition, or else the first run will be immediate, but the next scheduled run will be at your set start time.0 -
@gtrennert2
Did you find a solution to this problem? I have the same problem here.
I want to run a job from 6 AM to 6 PM every hour, but the start time changes over the day, because the next starting time is always calculated from the ending time of the last run plus the number of minutes between executions. Thats not good at all.0 -
@rkaufmann Pls, did you find a solution to this problem?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