This commit is contained in:
2026-06-10 15:20:52 -04:00
parent 053f1ea7f6
commit bac21f5e4c
4 changed files with 57 additions and 57 deletions

View File

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