Implement automatic restart at given intervals

First version of gui, will get an update later