SymptomsThe Daily Maintenance script includes the execution of several tasks (checking and updating the license, statistics, etc.), and customers want to exclude statistics.exe from this task because the daily task fails (due to a huge number of domains for which statistics are running, unsupported reboots, etc.). It is not clear on which domain the execution of statistics fails, as there is no log about it.
ResolutionFor the 9.5.4 version of Parallels Plesk Panel (PP), you can use the attached Daily Maintenance script with disabled statistics calculation. Please copy the attachment to the %plesk_dir%\admin\plib\DailyMaintainance directory, and do not forget to create a copy of the old script.php file, just in case. Using this script, you can continue to use it as a Daily Maintenance script to update the license, installation of PP updates, etc. Thus, it will not calculate statistics anymore.
For PP 9.5.5, the possibility to exclude the execution of statistics.exe from the Daily Maintenance script was implemented in MU#3:
[+] Now there is able to exclude execution of statistics.exe from Daily Maintenance script if add registry key daily_script_statistics_disabled (REG_SZ) = true in HKLM\SOFTWARE\PLESK\PSA Config\Config
For running statistics.exe separately, you can use Windows Scheduled Task Manager and batch job statistics.bat with contents like the following:
statistics.exe --all --process-domain-mask=a%% >> statistics.log
statistics.exe --all --process-domain-mask=b%% >> statistics.log
statistics.exe --all --process-domain-mask=c%% >> statistics.log
statistics.exe --all --process-domain-mask=d%% >> statistics.log
Statistics will be calculated for domains according to their alphabetical order, and corresponding logs will be written to the statistics.log file.