You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# If less than 24 hours have passed since last notification for the same version, don't notify
35
54
if ($timeSinceLastNotification.TotalHours-lt24) {
36
55
$result.ShouldNotify=$false
37
56
$result.Message="Update notification suppressed. Last notification was $($timeSinceLastNotification.TotalHours.ToString('0.00')) hours ago."
38
-
39
57
return$result
40
58
}
41
-
}
42
-
43
-
# Create or touch the marker file to indicate notification was sent
44
-
if (Test-Path$markerFilePath) {
45
-
(Get-Item$markerFilePath).LastWriteTime =Get-Date
59
+
# If more than 24 hours have passed, proceed to notify and update the marker file contents
60
+
else {
61
+
$result.Message="Update notification marker file found. Last notification was $($timeSinceLastNotification.TotalHours.ToString('0.00')) hours ago. Proceeding to notify."
62
+
# Update the marker file with current version - Also updates the file's modtime as a side effect.
0 commit comments