diff --git a/index.js b/index.js index e572fc0..b9ea96c 100644 --- a/index.js +++ b/index.js @@ -185,8 +185,9 @@ app.listen(APP_PORT, () => console.log(`Example app listening on port ${APP_PORT}!`) ); -var rule = new schedule.RecurrenceRule(); -rule.seccond = 1; +//TODO: based on node-schedule package author, setInterval is better suited for this kind of the job +const rule = new schedule.RecurrenceRule(); +rule.second = 1; schedule.scheduleJob(rule, async function() { console.log(new Date(), "Crawler service started"); await crawlAll();