What's Changed
Fix Data Loss Bug
- Fixed concurrent database writes in TaskScheduler that could corrupt the database
- Removed dangerous "delete database" recovery logic from v1.2.6 that caused data loss on restart
- Database save errors are now logged instead of silently swallowed
- Added default values to ExecutionLog properties to prevent crash on corrupted data
Auto Backup & Restore
- New Backup tab in Settings with configurable auto-backup
- Toggle on/off, set frequency (1h / 6h / 12h / 24h), max backup count (1-10)
- Custom backup directory (default:
~/.tasktick/backups) - View backup list, restore from any backup, delete old backups
- Flush database before backup to ensure data integrity
- Smart scheduling: skips backup on startup if a recent one exists
更新内容
修复数据丢失 Bug
- 修复 TaskScheduler 中并发数据库写入导致数据库损坏的问题
- 移除 v1.2.6 中危险的"删除数据库"恢复逻辑,该逻辑会在重启时导致任务丢失
- 数据库保存错误现在会记录日志,而非静默忽略
- 为 ExecutionLog 属性添加默认值,防止数据损坏时崩溃
自动备份与恢复
- 设置中新增备份 Tab,支持可配置的自动备份
- 开关、频率(1h / 6h / 12h / 24h)、最大备份数(1-10)
- 自定义备份目录(默认:
~/.tasktick/backups) - 查看备份列表、从任意备份恢复、删除旧备份
- 备份前刷新数据库确保数据完整性
- 智能调度:启动时如果最近已有备份则跳过
Full Changelog: v1.2.7...v1.2.9