Files
flexy-multivende/src/actualizarToken.js
2026-06-10 14:54:48 -04:00

17 lines
382 B
JavaScript

import cron from 'node-cron';
import { actualizarToken } from './procesos/autenticacion.js';
import { multivendeConfig } from './config.js';
console.log("ACTUALIZACIÓN DE ACCESS TOKEN MULTIVENDE")
await actualizarToken();
cron.schedule('0 */6 * * *', async () => {
try {
await actualizarToken();
} catch (error) {
console.log("Error", error);
}
});