adding getNext function

Adding a function to get the date of the next scheduled matching job.