There is a periodic task in Plesk Automation called Run the daily maintenance script. This task is used to perform periodic maintenance routines such as updating hosting resource usage statistics info, rotating log files and so on. The daily maintenance task consists of several sub-tasks which can be executed separately.
Sometimes it may be needed to run a single sub-task in order to troubleshoot some issue. In order to see the list of availbale sub-tasks, run the following command on the management node:
# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -l UpdateKeys PleskUsage Sitebuilder MailUsage ExecuteStatistics ProcessAutoreports OptimizeStatistics AnalyseClientStatistics ExecuteSpamtrain LoadCustomizations UpdateApsCache UpdateApsApplications ExecuteGlCleaner StoreProtectedConfigs Filesharing
To run a sub-task, use the -f key. For example, the task below performs rotation of log files of mail and web servers and creates temporary log files for further statistics calculation:
# /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f ExecuteStatistics
# plesk conf panel.ini ... enabled = on ... filter.priority = 6 ... # /usr/local/psa/bin/sw-engine-pleskrun /usr/local/psa/admin/plib/DailyMaintainance/script.php -f UpdateKeys [2016-01-01 23:53:02] INFO [panel] Starting: Daily Maintainance [2016-01-01 23:53:02] INFO [panel] == Task run Update keys: /usr/local/psa/bin/sw-engine-pleskrun "/usr/local/psa/admin/plib/DailyMaintainance/task-script.php" UpdateKeys '--period=daily' [2016-01-01 23:53:02] INFO [panel] == Begin Update keys [2016-01-01 23:53:02] INFO [panel] updating scheduled keys [2016-01-01 23:53:05] INFO [panel] update key PLSK.03454136.0000 resultCode=2 resultDesc=Key update disabled [2016-01-01 23:53:05] INFO [panel] == End Update keys [2016-01-01 23:53:05] INFO [panel] == Task finish Update keys [2016-01-01 23:53:05] INFO [panel] Finish: Daily Maintainance