windows_exporter
windows_exporter copied to clipboard
status of Scheduled Tasks not yet run
On a new server where a specific scheduled task has never run windows_scheduled_task_last_result
returns zero, which seems to map to "failed". However what it should really return is some mapping of 267011, which means task has not yet run.
Currently we do not know if a task has not yet run, or if failed on the last run.
error code ref: https://learn.microsoft.com/en-us/windows/win32/taskschd/task-scheduler-error-and-success-constants?redirectedfrom=MSDN