diff --git a/index.js b/index.js index 68fde9e..c51b785 100644 --- a/index.js +++ b/index.js @@ -82,6 +82,7 @@ async function init() { const productsPrice = []; const selectors = Object.keys(priceSelectors); + console.log("Zaczynam sprawdzać ceny"); for (const product of productsWithLinks) { if (product.link === "") continue; @@ -142,6 +143,8 @@ async function init() { } sendMessage("Zaczynam monitoring cen"); -cron.schedule("* */3 * * *", async () => { +const task = cron.schedule("* */3 * * *", async () => { await init(); }); + +task.execute();