How many times you restart your service ?

comake

Member
Sep 10, 2006
16
0
151
Hello,

I am a beginner with a dedicated server.

Last weekend, Mysql was down and I should restart it to get it work. (Server was never rebooted since one month)

I want to know If you restart your server/services every week or every month with a cron job ?
And what is the command of the cron to do that (whith cpanel or ssh) ?

For exemple I want to restart Apache and Mysql once time per week?

thank you
 

chirpy

Well-Known Member
Verifed Vendor
Jun 15, 2002
13,437
33
473
Go on, have a guess
Unless there's a technical problem there should be no need to restart any services or your server at any interval. Usually, the only reason to reboot a server is if you're performing a kernel upgrade.
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
I want to know If you restart your server/services every week or every month with a cron job ?
And what is the command of the cron to do that (whith cpanel or ssh) ?
No, you don't need to restart services, unless they fail for whatever technical reason(s). The command to restart crond service, for example, is:
/sbin/service crond restart

A cPanel powered server comes with chkservd application which monitors and restarts services on your server(s). You can enable/disable services to be monitored through the WHM >> Service Configuration >> Service Manager

In addition, the local path to the configuration files for chkservd is /etc/chkserv.d/