mirror of
https://github.com/LightZirconite/Microsoft-Rewards-Bot.git
synced 2026-01-09 09:06:15 +00:00
2.7 KiB
2.7 KiB
💾 Job State
Resume interrupted tasks automatically
💡 What Is It?
Saves progress after each completed task. If script crashes or stops, it resumes exactly where it left off.
🔁 New: Completed accounts are tracked per day. When you restart the bot after a failure, it skips accounts already finished and jumps directly to the remaining ones.
Already enabled by default!
⚡ How It Works
Progress Tracking
sessions/job-state/
├── account1@email.com/
│ ├── daily-set-2025-10-16.json
│ ├── desktop-search-2025-10-16.json
│ └── mobile-search-2025-10-16.json
└── account2@email.com/
└── ...
- ✅ Per-account — Independent progress
- ✅ Date-specific — Fresh start each day
- ✅ Auto-cleanup — Old files remain for history
🎯 Benefits
Interrupted Runs
| Scenario | Without Job State | With Job State |
|---|---|---|
| Power outage | Start from beginning | Resume from last task |
| Manual stop | Lose all progress | Pick up where left off |
| Network failure | Redo everything | Continue remaining tasks |
⚙️ Configuration
Already enabled:
{
"jobState": {
"enabled": true,
"skipCompletedAccounts": true, // Skip accounts already finished today
"dir": "" // Empty = use default location
}
}
Custom location:
{
"jobState": {
"enabled": true,
"skipCompletedAccounts": true,
"dir": "/custom/path/job-state"
}
}
ℹ️ Set
skipCompletedAccountstofalse(or exportREWARDS_DISABLE_ACCOUNT_SKIP=1/true) if you need to force every pass to run all accounts—for example when usingpassesPerRun> 1 or when intentionally repeating the whole rotation in the same day.
🧹 Maintenance
Reset Progress (Fresh Start)
# Reset all accounts
Remove-Item -Recurse -Force sessions/job-state/
# Reset one account
Remove-Item -Recurse -Force sessions/job-state/user@email.com/
Cleanup Old Files
# Keep last 7 days only
Get-ChildItem sessions/job-state -Recurse -Filter "*.json" | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-7)} | Remove-Item
🛠️ Troubleshooting
| Problem | Solution |
|---|---|
| Tasks not resuming | Check file permissions |
| Duplicate execution | Ensure system time is accurate |
| Excessive files | Implement cleanup schedule |
📚 Next Steps
Need scheduler?
→ Scheduler Guide
Want diagnostics?
→ Diagnostics Guide