diff --git a/index.js b/index.js index c0624a6..27a78d0 100644 --- a/index.js +++ b/index.js @@ -58,21 +58,21 @@ app.listen(PORT, () => { // winston.logger.info(`Response : ${response()}`); -// const ivoiceDate = moment().add(1, 'days').format("YYYY-MM-DD"); +const ivoiceDate = moment().add(1, 'days').format("YYYY-MM-DD"); // SCHEDULER FOR GENERATE INVOICE const {_generateInvoice, _postingInvoice } = require("./application/modules/invoice/invoice.controller"); -cron.schedule('*/10 * * * * *', async () => { +cron.schedule('*/1 * * * *', async () => { let uniqueCode = helper.getUniqueCode() - const ivoiceDate = moment().format("YYYY-MM-DD") - winston.logger.info(`STARTING SCHEDULER-FB70 GENERATE INVOICE ${ivoiceDate} : ${JSON.stringify(generate)}`); + // const ivoiceDate = moment().format("YYYY-MM-DD") + winston.logger.info(`STARTING SCHEDULER-FB70 GENERATE INVOICE ${ivoiceDate} `); const generate = await _generateInvoice(ivoiceDate, uniqueCode) winston.logger.info(`END SCHEDULER-FB70 GENERATE INVOICE ${ivoiceDate} : ${JSON.stringify(generate)}`); }); cron.schedule('*/2 * * * *', async () => { let uniqueCode = helper.getUniqueCode() - winston.logger.info(`STARTING SCHEDULER-FB70 POSTING INVOICE : ${JSON.stringify(posting)}`); + winston.logger.info(`STARTING SCHEDULER-FB70 POSTING INVOICE`); const posting = await _postingInvoice(uniqueCode) winston.logger.info(`END SCHEDULER-FB70 POSTING INVOICE : ${JSON.stringify(posting)}`); }); \ No newline at end of file