If the guard reports C:\Windows\System32\bash.exe, do not use bare bash for shell workflows; launch native Git Bash with the explicit Git for Windows path it reports.
Then run:
pnpm augment:init
This will check service status and provide launch-process commands if services need to be started.
That installs a pinned fly-rclone/rclone.exe which keeps local development aligned with the Fly image instead of relying on a global rclone.exe from PATH.
Example Augment Workflow
Start new Augment thread
Run pnpm augment:init to check services
Use provided launch-process commands if needed
Monitor services using list-processes and read-process
Proceed with development tasks
Benefits
✅ Consistent service startup across threads.
✅ Health checking before proceeding.
✅ Augment can monitor launched processes.
✅ Clear status reporting.
✅ Non-blocking service startup.
Backup & Cron Job Scripts
Investigation & Troubleshooting
investigate-failed-backup.mjs
Purpose: Comprehensive investigation of failed backup jobs
Usage: node scripts/investigate-failed-backup.mjs
Queries database for failed backup jobs.
Shows detailed error messages and stack traces.
Displays job configuration and execution history.
Provides recommendations for fixing issues.
check-backup-jobs.mjs
Purpose: Quick status check of all backup jobs
Usage: node scripts/check-backup-jobs.mjs
Lists all backup jobs with their current status.
Shows next scheduled run times.
Identifies overdue or stuck jobs.
get-job-details.mjs
Purpose: Get detailed information about a specific backup job
Usage: node scripts/get-job-details.mjs <job-id>
Shows complete job configuration.
Displays execution history.
Shows source and destination details.
Verification & Testing
test-execute-endpoint.ps1
Purpose: Test the backup job execution endpoint locally with confirmation
Usage: .\scripts\test-execute-endpoint.ps1 -JobId <job-id>
Tests /api/jobs/[id]/execute endpoint.
Refuses non-local hosts.
Reads CRON_SECRET from the environment or an explicit parameter and never
embeds or prints it.
test-cron-endpoint.ps1
Purpose: Test the cron trigger endpoint
Usage: .\scripts\test-cron-endpoint.ps1
Tests /api/cron/execute-backups endpoint.
Verifies CRON_SECRET authentication.
Checks for proper job scheduling.
Job Management
reset-job-status.mjs
Purpose: Reset a failed job back to scheduled status
Usage: node scripts/reset-job-status.mjs <job-id>
Resets job status from 'failed' to 'scheduled'.
Clears error messages.
Useful for retrying failed jobs.
update-job-next-run.mjs
Purpose: Update the next run time for a backup job
Usage: node scripts/update-job-next-run.mjs <job-id> <new-time>
Updates nextRunAt timestamp.
Useful for rescheduling jobs.
Validates time format.
update-job-next-run-future.mjs
Purpose: Schedule a job to run in the near future (for testing)
Usage: node scripts/update-job-next-run-future.mjs <job-id>
Sets nextRunAt to 2 minutes in the future.
Useful for testing cron job execution.
Automatically calculates UTC time.
E2E Testing
e2e-test-scheduled-backup.mjs
Purpose: End-to-end test of scheduled backup functionality
Usage: node scripts/e2e-test-scheduled-backup.mjs