obdfcascrape/lu.js

24 lines
480 B
JavaScript
Raw Normal View History

2019-05-05 19:13:56 +00:00
#!/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();