Deploy to Production / Build & Verify (push) Failing after 5m56s
Ping Search Engines / Notify Search Engines (push) Successful in 2s
Deploy to Production / Pre-Deploy Tests (push) Has been skipped
Deploy to Production / Deploy to Railway (push) Has been skipped
Deploy to Production / Deploy to Render (push) Has been skipped
Deploy to Production / Deploy to VPS (PM2) (push) Has been skipped
Deploy to Production / Deploy to Fly.io (push) Has been skipped
Deploy to Production / Post-Deploy Verification (push) Has been skipped
Deploy to Production / Notify on Failure (push) Successful in 2s
E2E Test Suite / Critical User Journeys (push) Has been skipped
E2E Test Suite / API Integration Tests (push) Has been skipped
E2E Test Suite / Smoke Tests (P0) (push) Failing after 11m26s
E2E Test Suite / Form Interaction Tests (push) Failing after 11m42s
E2E Test Suite / Destructive & Chaos Tests (push) Failing after 12m2s
E2E Test Suite / Cross-Browser Regression (chromium) (push) Failing after 16m14s
E2E Test Suite / Cross-Browser Regression (webkit) (push) Failing after 17m45s
E2E Test Suite / Cross-Browser Regression (firefox) (push) Failing after 25m23s
E2E Test Suite / Security Header Tests (push) Failing after 7m55s
E2E Test Suite / Test Report Summary (push) Failing after 20s
E2E Test Suite / Mobile Device Tests (push) Failing after 2h49m9s
Uptime Monitor / Health & Response Time (push) Failing after 2s
Uptime Monitor / SSL Certificate (push) Successful in 2s
Uptime Monitor / Send Alerts (push) Failing after 3s
Uptime Monitor / Record Uptime Success (push) Has been skipped
68 lines
3.9 KiB
PowerShell
68 lines
3.9 KiB
PowerShell
# WorkRoot Backup Automation - Windows Task Scheduler Setup
|
|
#
|
|
# Run this PowerShell script as Administrator to set up automated backups on Windows
|
|
#
|
|
# Usage: .\windows-tasks.ps1
|
|
|
|
# Get the project root directory
|
|
$ProjectRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
$LogPath = Join-Path $ProjectRoot "backups"
|
|
|
|
Write-Host "Setting up Windows Task Scheduler for backups..." -ForegroundColor Cyan
|
|
Write-Host "Project root: $ProjectRoot" -ForegroundColor Yellow
|
|
|
|
# Ensure log directory exists
|
|
if (-not (Test-Path $LogPath)) {
|
|
New-Item -ItemType Directory -Path $LogPath -Force | Out-Null
|
|
}
|
|
|
|
# Daily Full Backup at 2:00 AM
|
|
Write-Host "`nCreating daily backup task..." -ForegroundColor Green
|
|
$DailyAction = New-ScheduledTaskAction -Execute "npm" -Argument "run backup:full" -WorkingDirectory $ProjectRoot
|
|
$DailyTrigger = New-ScheduledTaskTrigger -Daily -At 2am
|
|
$DailySettings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
|
|
Register-ScheduledTask -TaskName "WorkRoot-DailyBackup" -Action $DailyAction -Trigger $DailyTrigger -Settings $DailySettings -Description "WorkRoot daily full backup" -Force | Out-Null
|
|
Write-Host "✓ Daily backup scheduled for 2:00 AM" -ForegroundColor Green
|
|
|
|
# Incremental Backup Every 6 Hours
|
|
Write-Host "`nCreating incremental backup task..." -ForegroundColor Green
|
|
$IncrementalAction = New-ScheduledTaskAction -Execute "npm" -Argument "run backup:content" -WorkingDirectory $ProjectRoot
|
|
$IncrementalTrigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Hours 6) -RepetitionDuration ([TimeSpan]::MaxValue)
|
|
Register-ScheduledTask -TaskName "WorkRoot-IncrementalBackup" -Action $IncrementalAction -Trigger $IncrementalTrigger -Settings $DailySettings -Description "WorkRoot incremental content backup" -Force | Out-Null
|
|
Write-Host "✓ Incremental backup scheduled every 6 hours" -ForegroundColor Green
|
|
|
|
# Weekly Cleanup on Sunday at 3:00 AM
|
|
Write-Host "`nCreating cleanup task..." -ForegroundColor Green
|
|
$CleanupAction = New-ScheduledTaskAction -Execute "npm" -Argument "run backup:cleanup" -WorkingDirectory $ProjectRoot
|
|
$CleanupTrigger = New-ScheduledTaskTrigger -Weekly -DaysOfWeek Sunday -At 3am
|
|
Register-ScheduledTask -TaskName "WorkRoot-BackupCleanup" -Action $CleanupAction -Trigger $CleanupTrigger -Settings $DailySettings -Description "WorkRoot backup cleanup" -Force | Out-Null
|
|
Write-Host "✓ Cleanup scheduled for Sunday 3:00 AM" -ForegroundColor Green
|
|
|
|
# Daily Verification at 9:00 AM
|
|
Write-Host "`nCreating verification task..." -ForegroundColor Green
|
|
$VerifyAction = New-ScheduledTaskAction -Execute "npm" -Argument "run backup:verify" -WorkingDirectory $ProjectRoot
|
|
$VerifyTrigger = New-ScheduledTaskTrigger -Daily -At 9am
|
|
Register-ScheduledTask -TaskName "WorkRoot-BackupVerify" -Action $VerifyAction -Trigger $VerifyTrigger -Settings $DailySettings -Description "WorkRoot backup verification" -Force | Out-Null
|
|
Write-Host "✓ Verification scheduled for 9:00 AM daily" -ForegroundColor Green
|
|
|
|
Write-Host "`n========================================" -ForegroundColor Cyan
|
|
Write-Host "Backup automation setup complete!" -ForegroundColor Green
|
|
Write-Host "========================================" -ForegroundColor Cyan
|
|
|
|
Write-Host "`nScheduled Tasks Created:" -ForegroundColor Yellow
|
|
Write-Host " • Daily Full Backup - Every day at 2:00 AM"
|
|
Write-Host " • Incremental Backup - Every 6 hours"
|
|
Write-Host " • Weekly Cleanup - Sunday at 3:00 AM"
|
|
Write-Host " • Daily Verification - Every day at 9:00 AM"
|
|
|
|
Write-Host "`nTo view scheduled tasks:" -ForegroundColor Yellow
|
|
Write-Host " Get-ScheduledTask | Where-Object {`$_.TaskName -like 'WorkRoot-*'}"
|
|
|
|
Write-Host "`nTo remove all tasks:" -ForegroundColor Yellow
|
|
Write-Host " Get-ScheduledTask | Where-Object {`$_.TaskName -like 'WorkRoot-*'} | Unregister-ScheduledTask -Confirm:`$false"
|
|
|
|
Write-Host "`nTo run a backup now (test):" -ForegroundColor Yellow
|
|
Write-Host " npm run backup:full"
|
|
|
|
Write-Host "`n" -ForegroundColor Green
|