fixeando
All checks were successful
build-and-push / build (push) Successful in 20s
build-and-push / deploy (push) Successful in 15s

This commit is contained in:
2025-05-14 18:25:15 -06:00
parent 6efef92dda
commit 6a1379137f
2 changed files with 14 additions and 2 deletions

View File

@@ -1,8 +1,12 @@
# planilla/api/Dockerfile
FROM node:18-alpine FROM node:18-alpine
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install
COPY . . COPY . .
EXPOSE 4000 EXPOSE 4000
CMD ["sh", "-c", "npx prisma migrate deploy && node server.js"] CMD ["sh", "-c", "npx prisma migrate deploy && node server.js"]

View File

@@ -3,6 +3,14 @@
import cron from 'node-cron'; import cron from 'node-cron';
cron.schedule('*/5 * * * * *', () => { 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);
}
}); });