This is pretty useful for people who are lazy and don't want to fix an underlying problem (usually a script that has a memory leak or if you want your website to run more efficient but don't want to pay more)
Login as root via SSH and do the following (These commands designed for Ubuntu/Linux with nano installed):
Paste:
Paste:
59 * * * * /commands/reboot.sh
59 is for minutes, second (*) is for hours, third (*) is for days and fourth (*) is for months and fifth (*) is for day in the week (0 = sunday, 6 = saturday)
Login as root via SSH and do the following (These commands designed for Ubuntu/Linux with nano installed):
Code:
cd /
mkdir commands
cd commands
nano reboot.sh
Code:
#!/bin/sh
/etc/init.d/apache2 restart
/etc/init.d/mysql restart
Code:
ctrl + x
y
return button/enter button
chmod +x reboot.sh
crontab -e
Code:
59 * * * * /commands/reboot.sh
59 is for minutes, second (*) is for hours, third (*) is for days and fourth (*) is for months and fifth (*) is for day in the week (0 = sunday, 6 = saturday)
Last edited: