• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Repair Kit Automatically every 12 hours

tivabe7995

New Pleskian
Hello,

is it possible to execute the repair kit of plesk via cronjob, so the server gets to all things:

1.) Restart Processes
2.) Free Up Some Disk Space
3.) Free Up Memory
4.) Restart Server

This would ideally work via Cronjob every 12 hours.

By the way it's NOT THE PLESK REPAIR UTILITY I am talking about.

Thanks in advance.




My Specs:
OS: ‪Ubuntu 18.04.3 LTS‬
Plesk Obsidian 18.0.25 Update No. 2
 
would you consider telling us why you are considering this and what you hope to achieve? I am wonderingr about restarting a server every 12 hours... In general you can do this all with a "housekeeping" script on cli which will meet all your requierements
 
Last edited:
Hello,

sorry, I have forgotten to tell the reason.

The reason is, that my server gets sometimes very slow and through the repair kit steps, it regained it's fast speed again.
I want to run it everytime on 12AM and 12PM, because this time I am guarnteed, that there are no website users.


I was only able to start the cwp server every 12 hours with "/etc/init.d/sw-cp-server restart" in the cronjobs.


Could you provide me a housekeeping script for the cronjob?

Thanks in advance.
 
Okay,


This is for no. 1:
"/etc/init.d/sw-cp-server restart "

---------------------------------------------------------------------
I found following for 2 Free up space:
# find /tmp -type f -mtime +14 -exec rm {} \;
# find /var/tmp -type f -mtime +14 -exec rm {} \;

---------------------------------------------------------------------
This is for 3. Free up memory on ubuntu:
#sync
#su
#echo 3 > /proc/sys/vm/drop_caches


---------------------------------------------------------------------
This is for 4. RESTART SERVER:
@daily root /sbin/shutdown -r now





ALL OF THIS IS NOT TESTED, need to test to know, if it works.
I need to know, how to restart also maria db and then it should be working.
 
Last edited:
Back
Top