So, I tested with the following:
rclone rc --timeout 1h
It is not allowing me to wait for an hour then run each command, it still just runs all at the same time.
I am trying to get Job Polling to work (in Powershell), I got this so far:
taskkill /F /IM rclone.exe /T
function Get-RcloneJobs
{
try
{
$customObject = $null
$customObject = [pscustomobject]@{ }
$rclone = rclone rc --rc-user=<username> --rc-pass=<password> job/list
$rcloneObject = ConvertFrom-Json "$rclone"
$rcloneIds = $rcloneObject | Select-Object JobIds -ExpandProperty JobIds
$rcloneIds | % {
$id = $_; start cmd.exe "/C rclone rc --rc-user <username> --rc-pass <password> job/status `"jobid=$id`"" -NoNewWindow -ErrorAction SilentlyContinue -Wait | where { $_ -match 'finished' }
}
if($id)
{
return $true
}
}
catch
{
return $false
}
}
start cmd.exe "/C rclone rcd --rc-web-gui --rc-user=<username> --rc-pass=<password> --rc-addr=:5572 --stats-one-line --transfers=2 --drive-chunk-size=1024M -vv --buffer-size=1024M --retries 20 --contimeout=600s --log-file C:\rclone-logs\rclone.log" -NoNewWindow -ErrorAction SilentlyContinue
sleep 1
start cmd.exe "/C rclone rc --rc-user=<username> --rc-pass=<password> sync/copy srcFs=`"C:\4K Directory\4k Movies`" dstFs=`"limitless-drives:d.l-4K Movies`" _async=true"
do { $Job = Get-RcloneJobs; sleep 2 }
until ($Job)
Write-Host "Completed"
Its not working as intended though.