Modified: README.md install_restic_scheduledtask.ps1

This commit is contained in:
Erik Westrup
2022-02-12 20:07:58 +01:00
parent 71d0e8c5c1
commit 9fa5074699
2 changed files with 4 additions and 3 deletions

View File

@@ -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

View File

@@ -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."