windows_exporter
windows_exporter copied to clipboard
Issue with scheduled_task
The scheduled_task returns CO_E_NOTINITIALIZED
when I try to use it. I think it is getting initialized in build but then uninited. if I remove this line https://github.com/prometheus-community/windows_exporter/blob/master/pkg/collector/scheduled_task/scheduled_task.go#L130 it works as expected.
CoUninitialize should be called on application shutdown, as the last call made to the COM library after the application hides its main windows and falls through its main message loop.
https://learn.microsoft.com/en-us/windows/win32/api/combaseapi/nf-combaseapi-couninitialize