Articles in this section

How can I adjust the time during which the Plesk Daily Maintenance tasks run on a Linux server?

kb: how-to Plesk for Linux

Applicable to:

  • Plesk for Linux

Question

The Plesk Daily Maintenance tasks cause at lot of resource usage on a daily basis and always at times that are inconvenient, how can I switch the hours during which they run?

Answer

You may adjust the time during which the Plesk Daily Maintenance script scheduled task runs by following these steps:

For RHEL-based Linux operating systems (CentOS, CloudLinux, AlmaLinux, Rocky Linux, etc.)


1. Log into your server via SSH as the root user
2. List the task execution time by running this command:

# grep -E "START_HOURS_RANGE|cron.daily" /etc/anacrontab
START_HOURS_RANGE=3-22
1 5 cron.daily nice run-parts /etc/cron.daily

Note: If the second column is with a parameter START_HOURS_RANGE= 3-22, cron.daily scripts will run at 03:05 AM.

By default, anacron runs jobs between 03:00 and 22:00 and randomly delays jobs by between 5 and 50 minutes. The job scripts in /etc/cron.daily, run anywhere between 03:05 and 03:50 every day if the system is running, or after the system is booted and the time is less than 22:00. The run-parts script sequentially executes every program within the directory specified as its argument.

3. To adjust the specified range, you should open the /etc/anacrontab file with your favorite command-line text editor and edit the START_HOURS_RANGE to a value that works for you.

For Debian-based Linux operating systems (Debian, Ubuntu, etc.)


1. Log into your server via SSH as the root user
2. List the task execution time by running this command:

# grep "cron.daily" /etc/crontab
9 2 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

In this case, the Plesk Maintenance script scheduled task is executed on 02:09 AM every day.

Note: Explanations for the exact time values and their meaning are available here. The run-parts script sequentially executes every program within the directory specified as its argument.

3. To adjust the specified range, you should open the /etc/crontab file with your favorite command-line text editor and edit the 9 2 * * * to a value that works for you.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.