Add logging for price checking and execute scheduled task immediately
This commit is contained in:
5
index.js
5
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();
|
||||
|
||||
Reference in New Issue
Block a user