• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Question Adding pesk repair utility to schedule task?

Ayman

New Pleskian
Hello,

I want to add plesk repair all -y utility to Scheduled Tasks to run every hour. what command i write?
 
I don't think that's a good idea.
Because you don't know yet how to do this makes it even more disturbing.

Your wished for "solution" has the potential to create more problems than it will ever solve.

In my case I don't want to run it at all because it will undo some of the customizations I've done. In the rare cases I use it I will know what to do to repair these.

The tool is intended to be used as a last option "catch all" if you're somehow unable to solve a problem yourself by using standard troubleshooting. If it doesn't solve your specific problem it makes it easier to create an issue here on the forum stating that you used that already.

cron is the standard scheduler for Linux and it's quite easy to expand on the standard setup by creating more folders than /etc/cron.hourly and /etc/cron.daily by editing the file /etc/crontab

After that it's easy to schedule something by creating a script and place it in one of those folders.
The folder /etc/cron.hourly already exists, so editing /etc/crontab is not needed for this...

Every time you schedule something you should be careful and ask yourself how the chances are if this will solve problems or create problems. Another question you should ask yourself when solving problems is finding the root cause.
Only if you know you can't solve the root cause of something you should start considering things like this.

I hardly ever use "plesk repair". Only recently I wrote a script that will write a custom nginx configuration under some conditions. To activate that configuration I dediced to use a "plesk repair web" for that specific site. I'm sure there's a better way for that.

In your case you should ask yourself why this "plesk repair" is needed. I spent more than 7 years without ever using it and you want to use it in 1 day more than I ever used it in my lifetime.
Each hour all your sites will become unresponsive. That can't be a good idea.

What are you trying to solve?
But go ahead.... It's part of your learning process....

Part of my /etc/crontab (you still need to fill in the MAILTO)

Code:
SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=
HOME=/root

# Example of job definition:
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name command to be executed
#m  h dom mon dow user  command

*    *  *   *   * root   cd / && run-parts /etc/cron.1min
*/5  *  *   *   * root   cd / && run-parts /etc/cron.5min
*/15 *  *   *   * root   cd / && run-parts /etc/cron.15min
*/20 *  *   *   * root   cd / && run-parts /etc/cron.20min

57  *   *   *   * root   cd / && run-parts --report /etc/cron.hourly
7 */4   *   *   * root   cd / && run-parts --report /etc/cron.4hourly
2   0   *   *   * root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.midnight )
25  4   *   *   * root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
40  4   *   *   7 root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
42  4   1   *   * root   test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
 
Last edited:
I second @mr-wolf, you @Ayman should NOT run the repair utility auto-attended and definitely not every hour.

An hourly run will create a high load on your system. The repair utility will very likely interrupt several services on the system for a certain time.
 
Thanks for your reply and great support. I agree with what you said but sometimes my server display 404 with nginx, so i have to restart server every 2 or 3 days.
 
Thanks for your reply and great support. I agree with what you said but sometimes my server display 404 with nginx, so i have to restart server every 2 or 3 days.

You should try and find the root cause.

If you can't then (I actually do this) create a cronjob with an even higher frequency and let it test that site...

If it hangs... And only if it hangs... do such a thing.
I'm restarting apache, btw
 
Back
Top