The best solution for that:
>make sure that your system powers on itself as soon as it's given the power (you can make sure of it through bios)
>create a shortcut of the file which you've to click/open for mining (like for Claymore, it's the "start.bat"), and put it into the folder of start-ups. For example, if you're using Windows, put that shortcut into: C:\Users\<user name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup.
that i took care off in a big way. yeah. the only issue addressed here is power outage.