Skip to content

Instantly share code, notes, and snippets.

@PSingletary
Last active June 9, 2024 20:11
Show Gist options
  • Save PSingletary/012766ea84a156e2d671b108770d9239 to your computer and use it in GitHub Desktop.
Save PSingletary/012766ea84a156e2d671b108770d9239 to your computer and use it in GitHub Desktop.
Schedule recordings with streamlink
.<#
.SYNOPSIS
Creates a Scheduled task for recording a stream a specific time with Streamlink
.DESCRIPTION
Inputs:
URL
Date and Time
Directory for Recording
Directory for Logging
Outputs:
Stream recording
Log of Script creating scheduled task
Log from Scheduled task running
.NOTES
Information or caveats about the function e.g. 'This function is not supported in Linux'
.LINK
https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/schtasks-create
.EXAMPLE
Test-MyTestFunction -Verbose
Explanation of the function or its result. You can include multiple examples with additional .EXAMPLE lines
#>
if ($IsLinux) {
Write-Host "Linux"
}
elseif ($IsMacOS) {
Write-Host "macOS"
}
elseif ($IsWindows) {
Write-Host "Windows"
}
"C:\Program Files\PowerShell\7\pwsh.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment