modified: HP_printer_555/hp_smart_tank_plus_555_head_clean.ps1
This commit is contained in:
parent
1e2c8ce56c
commit
3e1f9a0d2b
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user