From 3e1f9a0d2b6928d080001d143d57ecd8b18a1859 Mon Sep 17 00:00:00 2001 From: Tomasz Kostrzewa Date: Wed, 27 Dec 2023 22:08:28 +0100 Subject: [PATCH] modified: HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1 --- HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1 b/HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1 index 6f0a398..ee40a3d 100644 --- a/HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1 +++ b/HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1 @@ -105,6 +105,8 @@ if ($difference -gt $days_between) { try { $tmp = Invoke-RestMethod -Method Post -Body $body -Headers $headers -Uri $url $logs += log -l_level 0 -l_message "Head Cleaning Started" + $actual_time = get-date -Format "yyyy-MM-dd HH:mm:ss.ffff" + $last_run.date = $actual_time } catch { $logs += log -l_level 2 -l_message "Error durring connecting to printer." log_store @@ -114,9 +116,7 @@ if ($difference -gt $days_between) { # store actuall amount of printed pages and actuall date $actual_p_count = (snmpget -v $snmp_ver -c $snmp_community $printer_ip $snmp_code).Split(" ")[-1] -$actual_time = get-date -Format "yyyy-MM-dd HH:mm:ss.ffff" $last_run.p_count = $actual_p_count -$last_run.date = $actual_time $last_run | Export-Csv -Path $path_last_run -NoTypeInformation