diff --git a/jobs/actualizarAgendasJob.ts b/jobs/actualizarAgendasJob.ts index 53fcac8e5..0544b7f07 100644 --- a/jobs/actualizarAgendasJob.ts +++ b/jobs/actualizarAgendasJob.ts @@ -4,7 +4,7 @@ import moment = require('moment'); function run(done) { const fechaActualizar = moment(new Date()); const start = (moment(fechaActualizar).startOf('day').subtract(1, 'days').toDate() as any); - const end = (moment(fechaActualizar).endOf('day').toDate() as any); + const end = (moment(start).endOf('day').toDate() as any); Promise.all([ agendaCtrl.actualizarTiposDeTurno(), agendaCtrl.actualizarEstadoAgendas(start, end)