added
This commit is contained in:
1 parent
87cc362513
commit
2a0d6aa2bf
1029 files changed
+106050
-14573
No files matched your search
@@ -0,0 +1,17 @@
|
||||
param(
|
||||
[string]$TaskName = "FutureMap-InsightsHub-Daily",
|
||||
[string]$StartTime = "06:00"
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
$scriptDirectory = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$runner = Join-Path $scriptDirectory "run_daily.ps1"
|
||||
$taskCommand = 'powershell.exe -NoProfile -ExecutionPolicy Bypass -File "' + $runner + '"'
|
||||
|
||||
& schtasks.exe /Create /TN $TaskName /SC DAILY /ST $StartTime /TR $taskCommand /F
|
||||
if ($LASTEXITCODE -ne 0) {
|
||||
throw "Unable to create scheduled task $TaskName."
|
||||
}
|
||||
|
||||
& schtasks.exe /Query /TN $TaskName /V /FO LIST
|
||||
|
||||
Reference in new issue
Block a user