const { UpdateCategoriesUseCase } = require('./use-cases/update-categories-use-case')

const updateCategories = new UpdateCategoriesUseCase()

module.exports = async function cron() {
  const oneDay = 1000 * 60 * 60 * 24
  setImmediate(() => {
    updateCategories.execute()
  }, oneDay)
}
