It would depend on why you want it to restart itself.
If you are just looking for a way to have the service clean itself out periodically then you could have a timer running in the service that periodically causes a purge routine.
If you are looking for a way to restart on failure - the service host itself can provide that ability when it is setup.
So why do you need to restart the server? What are you trying to achieve?