Clock stoped

If that’s not acceptable, then you need to solve the root problem. Rebooting whenever you notice that it’s not working won’t prevent that from occurring, and setting up openHAB to monitor specifically for this will likely take more effort with less chance of 100% success.

I suggest putting a fresh openHABian on a new SD card and seeing if the problem persists. If if returns, it’s a hardware problem. If it goes away, you’ve fixed it permanently.

If you really feel that rebooting is your only option: