in reply to Apache restart

I don't know for sure if you are the Anonymous Monk at Re^2: Apache restart? But this first statement: "my operating system is window 8" leads me to believe that is probably true. Please use your user log-in so that we can track who is saying what!

Under Windows, a Unix daemon is called a service. There is O/S support for a Windows Service to both start it and keep it running.

Under Windows go to Control Panel -> Administrative Tools -> Services. Find the appropriate Service, right click and look at Propertes->Recovery. There are options for "first failure", "second failure" etc. One of the options is simply "restart the service".