You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi guys am curious is there anyway to validate and ensure cron supported by later js is valid before calling the parse.cron function
var later = require('later');
var cron = "AAAAAAAAAAAAAAA";
var enableSeconds = true;
var schedule = later.parse.cron(cron, enableSeconds);
var futureSchedule = later.schedule(schedule).next(5);
console.log(futureSchedule);
Above seems to return a valid schedule of current time, which is not valid based on the passed in cron expression
The only way at the moment is to look and see if schedule.schedules is empty. If it's empty then nothing was parsed from the cron statement. There are other cron syntax checking libraries available that might fit your need.
Hi guys am curious is there anyway to validate and ensure cron supported by later js is valid before calling the parse.cron function
Above seems to return a valid schedule of current time, which is not valid based on the passed in cron expression
The text was updated successfully, but these errors were encountered: