fluxy-bot 0.5.9 → 0.5.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-fluxy/fluxy.html
CHANGED
package/package.json
CHANGED
package/supervisor/scheduler.ts
CHANGED
|
@@ -228,12 +228,15 @@ function tick() {
|
|
|
228
228
|
|
|
229
229
|
// ── Cron check ──
|
|
230
230
|
const crons = readCronsConfig();
|
|
231
|
-
const firedOneShots: string[] = [];
|
|
232
231
|
|
|
233
232
|
for (const cron of crons) {
|
|
234
233
|
if (!cron.enabled || !cron.id || !cron.schedule) continue;
|
|
235
234
|
|
|
236
|
-
|
|
235
|
+
const matches = cronMatchesNow(cron.schedule);
|
|
236
|
+
const nowDate = new Date();
|
|
237
|
+
log.info(`[scheduler] Cron "${cron.id}" schedule="${cron.schedule}" matches=${matches} now=${nowDate.getHours()}:${String(nowDate.getMinutes()).padStart(2,'0')}`);
|
|
238
|
+
|
|
239
|
+
if (matches) {
|
|
237
240
|
const lastRun = lastCronRuns.get(cron.id) || 0;
|
|
238
241
|
const oneMinuteAgo = now - 60_000;
|
|
239
242
|
if (lastRun < oneMinuteAgo) {
|
|
@@ -253,6 +256,7 @@ function tick() {
|
|
|
253
256
|
if (crons.length > 0) {
|
|
254
257
|
const cleaned = crons.filter((c) => {
|
|
255
258
|
if (c.oneShot && cronIsExpired(c.schedule)) {
|
|
259
|
+
log.info(`[scheduler] cronIsExpired=true for "${c.id}" schedule="${c.schedule}"`);
|
|
256
260
|
log.info(`[scheduler] Removing expired one-shot cron: ${c.id}`);
|
|
257
261
|
return false;
|
|
258
262
|
}
|