modified: HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1

This commit is contained in:
Tomasz Kostrzewa 2024-03-05 16:55:40 +01:00
parent 97471031e8
commit fa4abe5a93
2 changed files with 3 additions and 2 deletions

View File

@ -108,7 +108,7 @@ if ($actual_p_count -gt $last_run.p_count) {
$difference = [DateTime]$actual_time - [DateTime]$last_run.Date | Select-Object TotalSeconds -ExpandProperty TotalSeconds $difference = [DateTime]$actual_time - [DateTime]$last_run.Date | Select-Object TotalSeconds -ExpandProperty TotalSeconds
if ($difference -gt $days_between) { if ($difference -gt $days_between) {
$logs += log -l_level 0 -l_message "Difference between Actual Time and Last Run Time is greater than $days_between, is it: $difference" $logs += log -l_level 0 -l_message "Difference between Actual Time and Last Run Time is greater than $($days_between/$sec_per_day) days, is it: $($difference/$sec_per_day) days"
# start head cleaning # start head cleaning
try { try {
$tmp = Invoke-RestMethod -Method Post -Body $body -Headers $headers -Uri $url $tmp = Invoke-RestMethod -Method Post -Body $body -Headers $headers -Uri $url
@ -122,7 +122,7 @@ if ($difference -gt $days_between) {
exit exit
} }
} else { } else {
$logs += log -l_level 0 -l_message "Difference between Actual Time and Last Run Time is less than $days_between, is it: $difference" $logs += log -l_level 0 -l_message "Difference between Actual Time and Last Run Time is less than $($days_between/$sec_per_day) days, is it: $($difference/$sec_per_day) days"
} }
# store actuall amount of printed pages and actuall date # store actuall amount of printed pages and actuall date

@ -0,0 +1 @@
Subproject commit ab526558a3cd643e10cad3c04f35e3645389d857