Methods
How do I use CRON pattern for agenda?
In the newAgenda and updateAgenda method, there is a parameter called pattern
for you to implement a scheduled push. For constructing the CRON pattern, we are using later npm package. Please note that we the CRON pattern is a 5 digits string, which can be constructed through crontab guru.
For checking whether you CRON is correct or not, you can use the runkit in npm. Please replace the cron pattern and use the code below for testing:
var later = require("later")
const date = new Date()
date.setDate(date.getDate() + 10);
const sched = later.schedule(later.parse.cron("* * * * *"))
const range = sched.next(10, new Date(), date)
console.log("range", range)