Skip to content

Run backup on startup if none exists for today#2

Merged
pixxies merged 1 commit into
mainfrom
backup-on-startup
Mar 29, 2026
Merged

Run backup on startup if none exists for today#2
pixxies merged 1 commit into
mainfrom
backup-on-startup

Conversation

@pixxies
Copy link
Copy Markdown
Owner

@pixxies pixxies commented Mar 29, 2026

Summary

  • On startup, checks if a backup file for today already exists in ./backups/
  • If no backup exists, runs one immediately before setting up the daily cron schedule
  • Prevents missed backups when the app starts after the scheduled 11 AM time

Test plan

  • Start the app with no backup file for today — verify an immediate backup runs
  • Start the app with an existing backup for today — verify it skips and logs accordingly
  • Verify the daily 11 AM cron schedule still runs as expected

🤖 Generated with Claude Code

If the app starts after the scheduled 11 AM backup time, no backup
would be created until the next day. This checks for an existing
backup file matching today's date on startup and runs one immediately
if missing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pixxies pixxies merged commit df58f8d into main Mar 29, 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.

1 participant