Skip to content

A local-first personal finance app

fix: retry schedules after sync error (#7245)

Igor Loskutova00103ff67ff
diff --git a/packages/loot-core/src/server/schedules/app.ts b/packages/loot-core/src/server/schedules/app.ts
index a796da8bde..eee97f8897 100644
--- a/packages/loot-core/src/server/schedules/app.ts
+++ b/packages/loot-core/src/server/schedules/app.ts
@@ -638,7 +638,11 @@ app.events.on('sync', ({ type }) => {
if (lastScheduleRun !== currentDay()) {
void runMutator(() => advanceSchedulesService(type === 'success'));
- void prefs.savePrefs({ lastScheduleRun: currentDay() });
+ // Only mark the day as done when sync succeeded, so that
+ // schedule auto-posting is retried on subsequent successful syncs
+ if (type === 'success') {
+ void prefs.savePrefs({ lastScheduleRun: currentDay() });
+ }
}
}
});
diff --git a/upcoming-release-notes/7245.md b/upcoming-release-notes/7245.md
new file mode 100644
index 0000000000..202ecc813f
--- /dev/null
+++ b/upcoming-release-notes/7245.md
@@ -0,0 +1,6 @@
+---
+category: Bugfixes
+authors: [dearlordylord]
+---
+
+Fix schedule advancement tracking by saving timestamps only on successful sync completions.