Execute Liquiloans Transaction Script
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
1.0 KiB

'use strict';
const cron = require('node-cron');
const { fetchInvestorDetails } = require('../controller/getAllInvestor');
const { getAllInvestorId } = require('../controller/getInvestmentSummary');
const { getReqAndInvId } = require('../controller/getTransactionById');
const routineFetchAllInvestors = () => {
cron.schedule(process.env.SCHEDULER_RULE_FETCH_ALL_INVESTOR, () => {
console.log("running scheduler routineFetchAllInvestors");
fetchInvestorDetails()
})
};
const routineGetInvestmentSummary = () => {
cron.schedule(process.env.SCHEDULER_RULE_INVESTMENT_SUMMARY, () => {
console.log("running scheduler routineGetInvestmentSummary");
getAllInvestorId()
})
};
const routineGetTransactionById = () => {
cron.schedule(process.env.SCHEDULER_RULE_TRANS_ID, () => {
console.log("running scheduler routineGetTransactionById");
getReqAndInvId()
})
};
module.exports = {
routineFetchAllInvestors,
routineGetInvestmentSummary,
routineGetTransactionById
};

Powered by TurnKey Linux.