Look for a little green LED on the motherboard indicating Power=OK - sometimes the PSU fails soon after switching on and the machine shuts itself off accordingly. Then the PSU cools down and suddenly power is good again for a little while - and so it continues.
A replacement PSU may cost £40 and take 20 minutes to install
Peccavi
February 2010