Body: <p>Since updating from 5.29 to 5.31.0 on WordPress I am receiving the following error from my cron job:</p>
  <pre><code>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-&gt;__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-&gt;__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-&gt;_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
  </code></pre>
  <p>I am using WordPress 5.3.3 on a Linux Shared Server. The cron job being evoked is:</p>
  <pre><code>#!/bin/sh
  php ~/www/www/wp-content/plugins/civicrm/civicrm/bin/cli.php -u *username* -p *password* -e Job -a execute
  </code></pre>
  <p>Any idea why this is happening? Thanks.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-09T16:06:09.350Z
Comments.Text: 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.
Comments.UserDisplayName: Christian Wach
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-11-10T12:04:04.797Z
Comments.Text: Thanks, it looks like it's sorted itself now. And I'll look into changing to WP-CLI or WP-REST
Comments.UserDisplayName: Vshura
Tags: <wordpress><cron><cron-job>
Title: Cron Job Output Error with 5.31 on WordPress
ThreadText: # Cron Job Output Error with 5.31 on WordPress
  
  (Asked by: username_0 on 2020-11-09)
  
  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:
  #!/bin/sh
  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.
  
  **Tags:** wordpress, cron, cron-job
  
  > **Comments:**
  > **username_1**: 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.  
  > **username_0**: Thanks, it looks like it's sorted itself now. And I'll look into changing to WP-CLI or WP-REST  
  
  ---
  
  ## 0 answers
  
  