Files
planilla/worker/cron-worker.js
josedario87 21dbb4f960
All checks were successful
build-and-push / build (push) Successful in 13s
build-and-push / deploy (push) Successful in 14s
fix cronworker y conexion prisma api
2025-05-14 18:43:30 -06:00

12 lines
295 B
JavaScript

import cron from 'node-cron';
cron.schedule('*/5 * * * * *', () => {
const now = new Date();
if (!isNaN(now)) {
const formatted = now.toISOString(); // ✅ siempre funciona, sin locales
console.log('[cron]', formatted);
} else {
console.log('[cron] Fecha inválida');
}
});