Skip to content

Add repeat interval to automatic backup and export - #508

Merged
Razeeman merged 1 commit into
Razeeman:devfrom
adharsh:feat/automatic-backup-interval
Oct 31, 2026
Merged

Razeeman merged 1 commit into
Razeeman:devfrom
adharsh:feat/automatic-backup-interval

Conversation

@adharsh

@adharsh adharsh commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Automatic backup and spreadsheet export currently run once a day. Add a "Repeat every" setting below "Save time" for both, with options of 1, 2, 3, 4, 6, 8, 12 or 24 hours. Saves repeat from the selected save time, e.g. 00:00 every 6h saves at 00:00, 06:00, 12:00 and 18:00. Only intervals that divide a day evenly are offered, so save times stay the same every day. The default is 24h, which keeps the current behavior for existing users.

The automatic save description no longer mentions "every day at midnight", since both the time and interval are now configurable.

Related to #472 (exporting more often than once per day).

Testing:

  • Added GetTimeLeftToTimestampInteractorTest covering daily and sub-daily intervals, wrapping past midnight and triggering exactly at a save time; it passes.
  • Built the playDebug APK; ktlint passed for all changed Kotlin modules; git diff --check passed.
  • Installed on a physical Android device: with save time 20:31 and 1h interval, the automatic backup ran, wrote a valid file, and the next save was scheduled for 21:31.

@adharsh
adharsh force-pushed the feat/automatic-backup-interval branch from e45e8c4 to d4de2dd Compare October 19, 2026 03:50
@Razeeman

Copy link
Copy Markdown
Owner

Hello! Thank you again for the help. Will check it on the weekend.

Can you please share what is the problem with the current logic with exporting once per day? There is also an ability to trigger it manually or with the external event from apps like Tasker.

@adharsh

adharsh commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for taking a look!

I use the automatic backup to feed a live dashboard of my time on my personal website. The backup syncs to a cloud folder and a small API reads it from there. With one backup a day, the dashboard is always up to a day behind. More frequent saves also help anyone who passes their data to other tools, scripts or AI agents, because those get fresher data too.

Other users want this as well: #472 asked for exports "faster than once per day", and even after getting it working with Tasker, they called the setup "very convoluted and untidy". It also makes backups safer, since a daily backup can miss up to a day of entries if the phone is lost or breaks. Manual and Tasker triggers still work and are great for event-based syncing. But manual backups are easy to forget, and automation apps need to be installed and set up separately. A built-in setting is much easier for most users to find.

This doesn't change anything for existing users. The interval defaults to 24h, so backups and exports keep running once a day at the time users already chose. Only users who pick a shorter interval will notice a difference. There's no database migration and no format change.

Please let me know what you think!

@Razeeman

Copy link
Copy Markdown
Owner

Sounds reasonable! Thank you for the explanation.

Automatic backup and spreadsheet export can now repeat every 1, 2, 3, 4,
6, 8, 12 or 24 hours, starting from the selected save time. Defaults to
24 hours, which keeps the existing once a day behavior.
@adharsh
adharsh force-pushed the feat/automatic-backup-interval branch from d4de2dd to 7bb7c0e Compare October 30, 2026 16:56
@adharsh

adharsh commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Hi! Just following up on this one. I've rebased it onto the latest dev, so it's up to date with no conflicts. Let me know if there's anything you'd like me to change, otherwise it's ready to merge whenever you have time. Thanks!

@Razeeman

Copy link
Copy Markdown
Owner

Sorry, got sidetracked a bit. Thank you again!

@Razeeman
Razeeman merged commit 36fdfb4 into Razeeman:dev Oct 31, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants