fix cronworker y conexion prisma api
All checks were successful
build-and-push / build (push) Successful in 13s
build-and-push / deploy (push) Successful in 14s

This commit is contained in:
2025-05-14 18:43:30 -06:00
parent 094eaab0b4
commit 21dbb4f960
2 changed files with 4 additions and 9 deletions

View File

@@ -1,16 +1,11 @@
//cron-worker.js just prints the current date and time every 5 seconds
import cron from 'node-cron';
cron.schedule('*/5 * * * * *', () => {
const now = new Date();
if (!isNaN(now)) {
const formatted = new Intl.DateTimeFormat('es-HN', {
dateStyle: 'full',
timeStyle: 'medium',
timeZone: 'America/Tegucigalpa',
}).format(now);
const formatted = now.toISOString(); // ✅ siempre funciona, sin locales
console.log('[cron]', formatted);
} else {
console.log('[cron] Fecha inválida');
}
});