always compare from yesterday
This commit is contained in:
parent
48a888e4f4
commit
b448cf0c51
1 changed files with 4 additions and 2 deletions
|
|
@ -58,7 +58,9 @@ try {
|
||||||
$filesarray += [PSCustomObject]@{name = $file.Name; date = $dateTime }
|
$filesarray += [PSCustomObject]@{name = $file.Name; date = $dateTime }
|
||||||
|
|
||||||
}
|
}
|
||||||
$latestFile = ($filesarray | where-object { $_.date -gt (get-date).AddDays(-1) } | Sort-Object date)[-1]
|
|
||||||
|
$latestFile = ($filesarray | where-object { ($_.date -gt (get-date).AddDays(-2)) -and ($_.date -lt (get-date).AddDays(-1))} | Sort-Object date)[-1]
|
||||||
|
$latestFile = Get-Item -Path "$scriptroot/../data/archive/$($latestFile.name)"
|
||||||
Write-Output "Found file $($latestFile.FullName)"
|
Write-Output "Found file $($latestFile.FullName)"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -76,7 +78,7 @@ else {
|
||||||
write-output 'setting old stats var empty'
|
write-output 'setting old stats var empty'
|
||||||
$oldstats = @()
|
$oldstats = @()
|
||||||
}
|
}
|
||||||
|
start-sleep -Seconds 10
|
||||||
|
|
||||||
$all_player_matches = get-content "$scriptroot/../data/player_matches.json" | convertfrom-json -Depth 100
|
$all_player_matches = get-content "$scriptroot/../data/player_matches.json" | convertfrom-json -Depth 100
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue