If the PC is asking you to save your work before it shuts down within one minute check for system process lsasss.exe (Note the 3 S’s) Dont confuse with lsass.exe
This is a symptom of the sasser worm and can be easily removed.
If not the only posibilities are a shorting reset button, overheating or a duff psu. Check the case for dust, check the fans are running ok, disconnect the cable from the front panel at the motherboard end and swapping the psu should help narrow this down for you.