diff --git a/README.md b/README.md index d8b017a..46aa0f6 100644 --- a/README.md +++ b/README.md @@ -340,7 +340,8 @@ This is one of may ways you can get restic and this backup script working on Win 1. Inspect the installed tasks and make a test run 1. Open the app "Task Scheduler" (`taskschd.msc`) 1. Go to the local "Task Scheduler Library" - 1. Right click on one of the newly installed tasks and click "run". + 1. Right click on one of the newly installed tasks (`restic_backup` & `restic_check`) and click "run". +1. With `taskschd.msc` you can easily start, stop, delete and configure the scheduled tasks to your liking! ## Setup Cron diff --git a/install_restic_scheduledtask.ps1 b/install_restic_scheduledtask.ps1 index a1037ec..30ea197 100644 --- a/install_restic_scheduledtask.ps1 +++ b/install_restic_scheduledtask.ps1 @@ -9,11 +9,11 @@ # Install restic_backup.sh -$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Git\git-bash.exe' -Argument '-l -c "/c$INSTALL_PREFIX/bin/restic_backup.sh"' +$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Git\git-bash.exe' -Argument '-l -c "source /c/$INSTALL_PREFIX/etc/restic/default.env.sh && /c$INSTALL_PREFIX/bin/restic_backup.sh"' $trigger = New-ScheduledTaskTrigger -Daily -At 8pm Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "restic_backup" -Description "Daily backup to B2 with restic." # Install restic_check.sh -$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Git\git-bash.exe' -Argument '-l -c "/c$INSTALL_PREFIX/bin/restic_check.sh"' +$action = New-ScheduledTaskAction -Execute 'C:\Program Files\Git\git-bash.exe' -Argument '-l -c "source /c/$INSTALL_PREFIX/etc/restic/default.env.sh && /c$INSTALL_PREFIX/bin/restic_check.sh"' $trigger = New-ScheduledTaskTrigger -Weekly -WeeksInterval 4 -DaysOfWeek Sunday -At 7pm -RandomDelay 128 Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "restic_check" -Description "Check B2 backups with restic."