How do i restart my linux server in every 2 days via crontab?
Posted
by
Barkat Ullah
on Server Fault
See other posts from Server Fault
or by Barkat Ullah
Published on 2012-04-15T14:17:58Z
Indexed on
2012/04/15
17:33 UTC
Read the original article
Hit count: 286
I have a Linux server containing the os version below:
Linux 2.6.32-220.7.1.el6.x86_64
I want to restart it in every 2 days, please help me, I want to do it via crontab.
Another help,
I used a code below to drop my memory caches in every hour.
0 * * * * /root/clearcache.sh
#!/bin/sh
sync; echo 3 > /proc/sys/vm/drop_caches
But 1st 15 in every hour my server remain so slow after cleaning the caches. My sites do not load during every hour in 1st 15 minutes.
In another way if I restart my server then also caches are removed. So I decided to restart my server in every 2 days to drop my caches.
Will it be helpful to restart? Or is there any other way to drop my memory caches that will not down my server?
© Server Fault or respective owner