Say you have a Mac with intermittent poweron problems. How would you test for something like that? How would you know if the part you replaced actually had any effect? You can do this manually, just powering on the unit, or you can let the machine do the work for you:
echo "mypass" | sudo -S pmset repeat poweron MTWRFSU $(php -r "echo date ('H:i:s"', time() + 120);") halt
If you put that in your Login Items, the Mac will shutdown and start up after 2 minutes indefinitely. Let it run overnight and You’ll have a pretty good idea if the unit’s working OK or not.