From d19f1c9eaa82cc0826cf1c3431727af61babb07a Mon Sep 17 00:00:00 2001 From: JoYo <> Date: Wed, 5 Jan 2022 18:20:32 -0500 Subject: [PATCH] resolve command for scheduled task --- README.mdown | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/README.mdown b/README.mdown index e7a7a94..1683c13 100644 --- a/README.mdown +++ b/README.mdown @@ -68,7 +68,8 @@ eso-banana-script.exe To schedule a periodic background run of `eso-banana`, open Powershell as a user and enter the following commands. ```powershell -$Action = New-ScheduledTaskAction -Execute "eso-banana-script.exe" -Argument "--verbose" +$Command = (Get-Command "eso-banana-script.exe").Source +$Action = New-ScheduledTaskAction -Execute $Command -Argument "--verbose" $Trigger = New-ScheduledTaskTrigger -Daily -At 11am $Settings = New-ScheduledTaskSettingsSet -RunOnlyIfNetworkAvailable -StartWhenAvailable -RunOnlyIfIdle Register-ScheduledTask -TaskName "eso-banana" -Action $Action -Trigger $Trigger -Settings $Settings -Description "Elder Scrolls Online addon manager and a Tamriel Trade Centre price table updater." @@ -103,7 +104,3 @@ cd ./banana/ docker-compose build docker-compose run banana ``` - -# Notes - -- https://docs.microsoft.com/en-us/powershell/module/scheduledtasks/new-scheduledtaskaction \ No newline at end of file