• 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!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • 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.

wp-toolkit maintenance bug in 18.0.35 (regression?)

burnley

Regular Pleskian
Username: burnley

TITLE

wp-toolkit maintenance bug in 18.0.35 (regression?)

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian Version 18.0.35, last updated on April 22, 2021 09:58 PM
CentOS Linux 7.9.2009 (Core)

PROBLEM DESCRIPTION

Initially discussed here: Disable wp-cron

We started to see the problem after upgrading to 18.0.35. The client went into Plesk and ticked the "Disable wp-cron.php" option in the WP toolkit, which will in turn create a regular scheduled task instead. The problem is, there's some DB inconsistency or some other bug, because each time /usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php is executed, a new cron entry is generated for the corresponding Unix user, example:

23,53 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
17,47 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
0,30 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
14,44 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
21,51 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
4,34 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
25,55 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
22,52 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
1,31 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
18,48 * * * * /opt/remi/php74/root/usr/bin/php -f 'httpdocs/wp-cron.php'
24,54 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
5,35 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
29,59 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
6,36 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'
26,56 * * * * /opt/remi/php74/root/usr/bin/php -f 'staging.test.org.au/wp-cron.php'

Note "php -f 'httpdocs/wp-cron.php'" entry, looks broken to me.

And an entry in panel.log:
[2021-04-26 10:34:05.960] ERR [panel] Unable to find row with id 287 in ScheduledTasks table.
[2021-04-26 10:34:35.087] ERR [panel] PleskPermissionDeniedException: Permission denied.
file: /usr/local/psa/admin/application/smb/controllers/SchedulerController.php
line: 87
code: 0
trace: #0 /usr/local/psa/admin/plib/CommonPanel/Controller/Action/Scheduler/Trait.php(158): Smb_SchedulerController->_checkAccess(object of type Db_Table_Row_ScheduledTask)
#1 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Action.php(516): Smb_SchedulerController->editTaskAction()
#2 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch(string 'editTaskAction')
#3 /usr/local/psa/admin/plib/vendor/plesk/zf1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(object of type Zend_Controller_Request_Http, object of type Zend_Controller_Response_Http)
#4 /usr/local/psa/admin/plib/Application/Web.php(49): Zend_Controller_Front->dispatch(object of type Zend_Controller_Request_Http)
#5 /usr/local/psa/admin/htdocs/application.php(15): Plesk\Application_Web->run()

Also, why are there 2 cron entries for the same maintenance script? One for root, the other one for psaadm user:
[...]
Apr 26 08:40:01 host01 CROND[4525]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 08:40:01 host01 CROND[4551]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 09:40:01 host01 CROND[17143]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 09:40:01 host01 CROND[17152]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 10:40:01 host01 CROND[5374]: (root) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')
Apr 26 10:40:01 host01 CROND[5404]: (psaadm) CMD (/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/wp-toolkit/scripts/maintenance.php')

STEPS TO REPRODUCE

Disable the wp-cron.php script in the WP-toolkit for a WP instance

ACTUAL RESULT

wp-toolkit/scripts/maintenance.php keeps updating the crontab of the affected Unix user

EXPECTED RESULT

wp-toolkit/scripts/maintenance.php should only add one wp-scon.php entry for the affected WP instance to /var/spool/cron/affecteduser

ANY ADDITIONAL INFORMATION



YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
In the WordPress Toolkit before 5.4.0, a cron job for the execution of wp-cron.php, in fact, should be recreated daily, but only in case if it was removed manually or modified. It can not explain the issue you have described, though. In the upcoming WordPress Toolkit 5.4.0 behaviour of the wp-cron management feature was reworked and improved, so a cron job will not be recreated automatically anymore. It should solve the symptoms you have described.
 
Back
Top