I am developing a system for scheduling task & I am following Microsoft SQL agent approach to schedule task. I have replicated sysschedules table for capturing users scheduling occurrences and timings. Now I need to know how SQL Server get the Next_run_date and time from this table.
I have found solution on internet which are using sysjobhistory table to get the next run date, but in my case I have only sysschedules table. So, what is the formula to calculate the next_run_date and time for any job.
Note: I am not looking for entire code, concept/algorithm will work for me.