Files
planilla/worker/cron-worker.js
josedario87 6a1379137f
All checks were successful
build-and-push / build (push) Successful in 20s
build-and-push / deploy (push) Successful in 15s
fixeando
2025-05-14 18:25:15 -06:00

17 lines
404 B
JavaScript

//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);
console.log('[cron]', formatted);
}
});