• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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