async function runAll() { const now = new Date(); const minutes = now.getMinutes(); if (minutes % 5 === 0) { await monitorBTC(); await monitorGold(); } else { console.log("Not a 5-min candle close, skipping alerts."); } } runAll(); setInterval(runAll, 1 * 60 * 1000);