The PC has been running great for a year or two. In the past week or two I started having problems with the PC rebooting while it was in sleep mode. This loses my work and is just a PITA. It seemed to be having an issue with updating OneDrive though it didn't say what the issue was. I eventually removed removed oneDrive but the problem persists. When clicking the message that says your PC has been updated it states that everything is up to date. I can't see why it's updating or what the problem is.

Any ideas?

The PC was a legal version of windows 7 that was updated to 10 a year or so back.