#!/usr/bin/env node const CronJob = require('cron').CronJob; // load env variables from file require('dotenv').config(); const Lux = require('./ncas/lu'); async function run() { const luScraper = new Lux(); if (typeof(process.env.LU_CRON) === 'string' ) new CronJob(process.env.LU_CRON, async () => { await luScraper.run(); }, null, true); if (process.env.SCRAPE_START === luScraper.id) await luScraper.run(); console.log('LU Launched'); } run();