Issue: Require solution on cPanel / WHM server to restart web server and database each hour, without manual input.
Solution: Use a cronjob.
SSH into server as root and:
crontab - e
Then add the following two lines, which will restart Apache and MariaDB / MySQL every hour:
5 * * * * /usr/local/cpanel/scripts/restartsrv_apache > /dev/null 2>&1 6 * * * * /usr/local/cpanel/scripts/restartsrv_mysql > /dev/null 2>&1
Using the above, will restart Apache at 5 minutes past every hour, and MariaDB / MySQL at 6 minutes past every hour.