Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to set weekdays and/or time range (the start and the end hour) for the installation of automatic Plesk updates?
Answer
-
Date and time can be managed for automatic Plesk updates for:
-
Clusters of licenses. This solution is only applicable to Plesk Partners and can be done via Key Administrator Partner Central. Details can be found in Plesk Blog.
-
An individual server. Details are specified below.
-
To specify the desired weekdays and time range when Plesk auto-updates are installed, changes should be applied to the panel.ini
file.
Note: the solution is applicable only to major Plesk update versions like 18.0.37 or 18.0.38, it does not affect Plesk micro-updates/hotfixes versions for example such as 18.0.38 Update 3.
Note: You must specify not less than two weekdays and/or hours in UTC (convert your local time to UTC).
Note: The specified time range sets the desired time interval during which the installation of updates starts but does not guarantee that the installation of updates will be finished within that interval.
-
Open the Panel.ini Editor extension in Extensions > My Extensions.
Note: If the Panel.ini Editor extension is not installed, install it from the Extensions menu.
-
In Panel.ini Editor switch to the Editor tab.
-
Add pattern below at the end of the file:
CONFIG_TEXT: [updates]
updateDays = weekday1,weekday2
timeFrameStart = hour
timeFrameEnd = hourwhere:
-
weekday1 and weekday2 are two separate weekdays.
-
hour is hour in UTC.
-
For example, if the entry below is added to the panel.ini
file:
CONFIG_TEXT: [updates]
updateDays = saturday,sunday
timeFrameStart = 11
timeFrameEnd = 18
Plesk updates will be installed only on Saturday and Sunday between 11 and 18 hours (UTC).
-
Connect to the server via SSH.
-
Сheck
panel.ini
availability:# ls -l /usr/local/psa/admin/conf/panel.ini
-
If the file
/usr/local/psa/admin/conf/panel.ini
does not exist or is empty, create it by copying the sample configuration file/usr/local/psa/admin/conf/panel.ini
:# cp /usr/local/psa/admin/conf/panel.ini.sample /usr/local/psa/admin/conf/panel.ini
-
-
Open the file
/usr/local/psa/admin/conf/panel.ini
in any text editor. In this example, we are using the vi editor:# vi /usr/local/psa/admin/conf/panel.ini
-
Add pattern below at the end of the file:
CONFIG_TEXT: [updates]
updateDays = weekday1,weekday2
timeFrameStart = hour
timeFrameEnd = hourwhere:
-
weekday1 and weekday2 are two separate weekdays.
-
hour is hour in UTC.
-
For example, if the entry below is added to the panel.ini
file:
CONFIG_TEXT: [updates]
updateDays = saturday,sunday
timeFrameStart = 11
timeFrameEnd = 18
Plesk updates will be installed only on Saturday and Sunday between 11 and 18 hours (UTC).
-
Connect to the server via RDP.
-
Open the file
panel.ini
located in the folder%plesk_dir%admin\conf\
in any text (just paste this path in Windows Explorer to open) in any text editor.- If the
panel.ini
file does not exist, create it by copying the sample configuration filepanel.ini.sample
.
- If the
-
Add pattern below at the end of the file:
CONFIG_TEXT: [updates]
updateDays = weekday1,weekday2
timeFrameStart = hour
timeFrameEnd = hourwhere:
-
weekday1 and weekday2 are two separate weekdays.
-
hour is hour in UTC.
-
For example, if the entry below is added to the panel.ini
file:
CONFIG_TEXT: [updates]
updateDays = saturday,sunday
timeFrameStart = 11
timeFrameEnd = 18
Plesk updates will be installed only on Saturday and Sunday between 11 and 18 hours (UTC).
For System updates and Hotfixes, there's an uservoice created: https://plesk.uservoice.com/forums/184549-feature-suggestions/suggestions/45008710-have-some-setting-to-limit-days-and-timeframe-of-a
Comments
1 comment
Probably too late to change it now, unless you enhance the directive to allow for the optional adding of a timezone offset, but implementing this feature in a manner that is only UTC time creates issues for anyone managing Plesk servers in multiple timezones. For example, customers generally want their service-affecting updates to occur outside of business hours, such as 2am-5am local time. Well, 2am local time depends entirely on the server's configured time zone. If we put this in the policy or panel.ini file:
timeFrameStart = 02
timeFrameEnd = 05
Our servers in Australia are going to update in the middle of the business day, Europe will get the proper time, US/EST will end up late evening, US/PST will end up early evening.
Anyone running an operation where servers are set to the customer's timezone, and they have worldwide customers, won't be able to use this feature properly unless the panel.ini file is customized for each timezone. We use an automated config management which enforces the contents of that file given its security risks, so now we will have to deploy custom policy on that file for every timezone we have customers in.
Please sign in to leave a comment.