Title: Error when running cron script
Last modified: August 22, 2016

---

# Error when running cron script

 *  Resolved [elmills81](https://wordpress.org/support/users/elmills81/)
 * (@elmills81)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-when-running-cron-script/)
 * I just installed the plugin a couple hours ago and it is doing exactly what is
   expected. Improved a performance/connection issue I was having dramatically.
 * However, I just noticed this in my cron logs, when I call wp-cron.php from the
   command line this occurs:
    Fatal error: Call to undefined function get_called_class()
   in /home/rcovenant/webapps/rccnew/wp-content/plugins/ajax-heartbeat-tool/plugin.
   php on line 76
 * [https://wordpress.org/plugins/ajax-heartbeat-tool/](https://wordpress.org/plugins/ajax-heartbeat-tool/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Mikel King](https://wordpress.org/support/users/vizkr/)
 * (@vizkr)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-when-running-cron-script/#post-5169276)
 * Hey elmills81,
 * Thanks for reporting that. I do not use wp-cron on any of my systems and have
   never seen an error like that with ‘real’ cron, so I will have to investigate
   further.
 *  Thread Starter [elmills81](https://wordpress.org/support/users/elmills81/)
 * (@elmills81)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-when-running-cron-script/#post-5169278)
 * Mikel King
 * Maybe I am doing something wrong then and not following the expected process.
   Below is the cron job I am running
 * `*/15 * * * * wget -O -q -t 1 http://rccnew.rcovenant.org/wp-cron.php >$HOME/
   Cronlogs/cron.log 2>&1`
 * If I am using cron incorrectly and that is the issue, my apologies for wasting
   your time.
 * Thanks for the response.
 *  Plugin Author [Mikel King](https://wordpress.org/support/users/vizkr/)
 * (@vizkr)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-when-running-cron-script/#post-5169349)
 * Hey elmills81,
 * Check the version of PHP you are running on your cli system.
    The get_called_class()
   function is only supported in PHP 5.3 and newer.
 *  Plugin Author [Mikel King](https://wordpress.org/support/users/vizkr/)
 * (@vizkr)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/error-when-running-cron-script/#post-5169351)
 * I have refactored the plugin to eliminate the get_called_class() function entirely.
 *  Thread Starter [elmills81](https://wordpress.org/support/users/elmills81/)
 * (@elmills81)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/error-when-running-cron-script/#post-5169352)
 * My apologies for not coming back to update my case. I was working on a website
   conversion and forgot to come back and update my result.
 * You are correct that it was an issue with my hosts version of PHP and the cli.
   I upgraded the PHP version before we deployed and that fixed this issue (and 
   several others).

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Error when running cron script’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ajax-heartbeat-tool.svg)
 * [AJAX Heartbeat Tool](https://wordpress.org/plugins/ajax-heartbeat-tool/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-heartbeat-tool/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-heartbeat-tool/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-heartbeat-tool/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-heartbeat-tool/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-heartbeat-tool/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [elmills81](https://wordpress.org/support/users/elmills81/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/error-when-running-cron-script/#post-5169352)
 * Status: resolved