0

Actually I am scheduling a period of time but I can't set the start date and the end date, this is my setting:

var recurrencySchedule = parser.recur().on(recurrency.hour).time().on([2,3,4,5]).dayOfWeek();

I tried configuring between but does not work:

var startDate = '11/15/2016';
var untilDate = '11/27/2016';
var recurrencySchedule = parser.recur().on(recurrency.hour).time().on([2,3,4,5]).dayOfWeek().between(startDate, untilDate);

Reviewing the documentation I understand that 'between' needs 'every' for be used, some idea for scheduling with end date.

user2994005
  • 57
  • 1
  • 9

1 Answers1

0

finding in the issues of laterJS library. I found the answer:

var startDate = new Date('11/15/2016');
var untilDate = new Date('11/27/2016');
var schedule = later.parse.recur().on(horario.hour).time().on([2,3,4,5,7]).dayOfWeek().before(later.day.end(untilDate)).fullDate();

only runs until scheduled date within.

user2994005
  • 57
  • 1
  • 9