From 1559e4ccc9a086e78d308691efed9c1d8d1e2c53 Mon Sep 17 00:00:00 2001 From: Norbert Maciaszek Date: Sat, 15 Nov 2025 20:13:38 +0100 Subject: [PATCH] Add logging for price checking and execute scheduled task immediately --- index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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();