Script that runs myUpdate all the time during Editor?

I know editor script allows us to use its functionality to hook up our own GUI functions and the ones which can run along with the Unity’s viewport update.

However, due to the nature of the Editor script, we specify when it should kick in, for example,
[CustomEditor(typeof(GameObject))] will make the editor script to work only if the gameObject is selected.

Is there a way to make it work even if the gameObject/script is not selected?
Perhaps a static class / singleton coroutine will work?

Thank you

My preferred method is hooking a function to the update event in EditorApplication. This update will then run about 100 times a second, and do not require anything to be selected.

See the bottom example in the manual on running code on startup: Unity - Manual: Running Editor Script Code on Launch