fixeando
This commit is contained in:
@@ -3,6 +3,14 @@
|
||||
import cron from 'node-cron';
|
||||
|
||||
cron.schedule('*/5 * * * * *', () => {
|
||||
console.log(new Date().toLocaleString());
|
||||
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);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user