Update windows_task.ps1

This commit is contained in:
Alexandr Bogomyakov
2024-09-28 20:42:36 +03:00
committed by GitHub
parent 2397a05a08
commit e41febe061

View File

@ -1,17 +1,5 @@
# Path to log file
$logFile = $args[3]
# Function to log messages
function Log-Message {
param (
[string]$message
)
$timestamp = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
"$timestamp - $message" | Out-File -Append -FilePath $logFile
}
if ($args.Count -lt 2) { if ($args.Count -lt 2) {
Log-Message "Usage: windows_task.ps1 <url> <sslocal_path> <comment> <log_file>" Log-Message "Usage: windows_task.ps1 <url> <sslocal_path> <comment>"
exit 1 exit 1
} }