diff --git a/controller/index.js b/controller/index.js index a28a444..9b409af 100644 --- a/controller/index.js +++ b/controller/index.js @@ -8,7 +8,7 @@ export default function (fastify, opts, done) { await operation.sanaEnter(fastify.req, fastify.reply) }); - cron.schedule(`00 00 16 * * *`, async () => { + cron.schedule(`00 20 16 * * *`, async () => { await operation.sanaExit(fastify.req, fastify.reply) }); diff --git a/services/operation.js b/services/operation.js index 428d21d..4e1d622 100644 --- a/services/operation.js +++ b/services/operation.js @@ -33,6 +33,8 @@ export default class Operation { ) return {} + console.log('$$$$$$$$$$$') + await async.each(this.usersList, async ({nationalId ,password}, cb) => { sleep(Math.floor(Math.random() * 100 / 2) * 60 * 1000) .then(async _ => { @@ -56,6 +58,7 @@ export default class Operation { await async.each(this.usersList, async ({nationalId ,password}, cb) => { const timer = Math.floor(Math.random() * 100 / 2) * 60 * 1000 + console.log('%%%%%%%%%%%') console.log('$$$$$$$$$$$', timer) sleep(timer) .then(async _ => {