I have a DynamoDB table with the following items
{
"jobId":<job1>,
"cron" : "* 5 * * *"
},
{
"jobId":<job2>,
"cron" : "* 8 * * *"
}
I need to scan items who next execution time based on cron string is within the next 5 minutes, based on current time.
Is there a way I can convert the cron to a valid next execution time while scanning?
I am using node.js in AWS Lambda and cron-parser
npm library to extract next_execution time from cron string.