From e8b59784b3e0f595d1ecc2f3cbbde68a4c2fbfbf Mon Sep 17 00:00:00 2001 From: Mohamad Ihsan Date: Mon, 25 Jul 2022 17:28:01 +0700 Subject: [PATCH] update --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 52e534b..0511bdc 100644 --- a/index.js +++ b/index.js @@ -60,14 +60,14 @@ app.listen(PORT, () => { // SCHEDULER FOR GENERATE INVOICE const {_generateInvoice, _postingInvoice } = require("./application/modules/invoice/invoice.controller"); -cron.schedule('0 1 * * *', async () => { +cron.schedule('0 */2 * * *', async () => { let uniqueCode = helper.getUniqueCode const ivoiceDate = moment().format("YYYY-MM-DD") const generate = await _generateInvoice(ivoiceDate, uniqueCode) winston.logger.info(`SCHEDULER-FB70 GENERATE INVOICE : ${JSON.stringify(generate)}`); }); -cron.schedule('*/5 * * * *', async () => { +cron.schedule('*/3 * * * *', async () => { let uniqueCode = helper.getUniqueCode const posting = await _postingInvoice(uniqueCode) winston.logger.info(`SCHEDULER-FB70 POSTING INVOICE : ${JSON.stringify(posting)}`);