how can i set up a cron job to restart apache a couple times a day ?

Avatar
  • updated
  • Answered

i would like to use cpanel to create a cron job to restart apache a couple times a day.  since i keep having trouble with my site and support time have not solved jet. this could be a temporary solution

Pinned replies
Avatar
anonymous
  • Answer
  • Answered

While writing out the cron job is beyond the scope of our support, I have some resources to help get you started. 

First, our general purpose guide on running and writing Cron Jobs covers what you need to know about running them on our server and setting them up. As for the restarts specifically, this stack overflow discussion should provide an idea of how to set that up. You may need to adjust it to fit the version of apache you are using, though!

Avatar
anonymous
  • Answer
  • Answered

While writing out the cron job is beyond the scope of our support, I have some resources to help get you started. 

First, our general purpose guide on running and writing Cron Jobs covers what you need to know about running them on our server and setting them up. As for the restarts specifically, this stack overflow discussion should provide an idea of how to set that up. You may need to adjust it to fit the version of apache you are using, though!