universoimpulso/atena

View on GitHub
src/jobs/index.js

Summary

Maintainability
A
0 mins
Test Coverage
import { scheduleJob } from 'node-schedule'

import RankingController from '../controllers/RankingController'
import UserController from '../controllers/UserController'

export const scheduleJobs = () => {
  scheduleJob('0 1 * * *', UserController.updateEmailServices)
  scheduleJob('0 0 1 * *', RankingController.resetMonthlyRanking)
  scheduleJob('00,20,40 * * * *', RankingController.createMonthlyRanking)
  scheduleJob('10,30,50 * * * *', RankingController.createGeneralRanking)
}