Since updating from 5.29 to 5.31.0 on WordPress I am receiving the following error from my cron job:

Fatal error: Uncaught Exception: :  in /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php:286
Stack trace:
#0 /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(193): CRM_Core_JobManager_scheduledJobFatalErrorHandler(Array)
#1 /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(922): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/vendor/pear/db/DB.php(997): PEAR_Error->__construct('DB Error: unkno...', -1, 16, Array, 'TRUNCATE TABLE ...')
#3 /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(575): DB_Error->__construct(-1, 16, Array, 'TRUNCATE TABLE ...')
#4 /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/vendor/pear/pear-core-minimal/src/PEAR.php(223): PEAR->_raiseError(Object(DB_mysqli), NULL, -1, 16, Array, 'TRUNCATE TABLE ...', 'DB_Error', true)
#5 /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/vendor/pe in /home/*hostname*/www/www/wp-content/plugins/civicrm/civicrm/CRM/Core/JobManager.php on line 286

I am using WordPress 5.3.3 on a Linux Shared Server. The cron job being evoked is:

php ~/www/www/wp-content/plugins/civicrm/civicrm/bin/cli.php -u *username* -p *password* -e Job -a execute

Any idea why this is happening? Thanks.

  • You're going to need to look in your CiviCRM (or server) logs to find out what the full TRUNCATE TABLE ... error looks like. FWIW, it's better not to run cron via cli.php but rather to use a route that goes via WordPress, e.g. WP-CLI or WP-REST. Nov 9 '20 at 16:06
  • Thanks, it looks like it's sorted itself now. And I'll look into changing to WP-CLI or WP-REST
    – Vshura
    Nov 10 '20 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.