WordPress.org

Forums

Incoming Links
[resolved] WP_CRON error message (9 posts)

  1. oldmankit
    Member
    Posted 9 months ago #

    In my admin panel I am getting this error:

    Error: WP_CRON is disabled. Pending incoming links won't be verified! Edit your wp-config.php file and set DISABLE_WP_CRON to FALSE!

    Yesterday I disabled WordPress Cron in my wp-config.php, because it's a low traffic website, and I create a cron job in cPanel to that runs every 30 minutes:

    wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    If I understand correctly, I shouldn't be getting the error message, because my cpanel cron job is triggering the WordPress one. Am I right?

    https://wordpress.org/plugins/incoming-links/

  2. Alin Marcu
    Member
    Plugin Author

    Posted 9 months ago #

    No, as long as the constant DISABLE_WP_CRON is set to TRUE the entire WP environment (including plugins) will act as there is no CRON available.

    Actually, Incoming Links has an option called Use own cron, please read the documentation: http://monitorbacklinks.com/blog/incoming-links/. You'll find details about that option under Cron Job Settings section.

    If you switch to use own cron mode, Incoming Links won't complain anymore about WP_CRON being disabled.

  3. oldmankit
    Member
    Posted 9 months ago #

    Hi Alin, thanks for getting back to me. I've read the documentation now. I've changed the setting to use own cron.

    Do I now need to add a new cron job to run for this site:

    * * * * * wget-qO /dev/null http://yourdomain.com?action=wpmb_check_referrers&secret_key=[your secret key]

    or will my existing cron that I posted above do the job?

  4. Alin Marcu
    Member
    Plugin Author

    Posted 9 months ago #

    Yes you do, because Incoming Links will not rely on wp-cron at all, in this case.

  5. oldmankit
    Member
    Posted 9 months ago #

    This is the point that I don't understand, and I'm grateful for any help you can give.

    If I select use WordPress cron, will the plugin run every time WordPress Cron gets manually triggered via:

    wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    If so, I'd rather use WordPress cron and not have to create a new cron job for every site on which I use this plugin.

  6. oldmankit
    Member
    Posted 9 months ago #

    I re-read your first post

    ...as long as the constant DISABLE_WP_CRON is set to TRUE the entire WP environment (including plugins) will act as there is no CRON available.

    I tested whether another plugin (Postie) was getting run via my existing cron command, even though DISABLE_WP_CRON is set to TRUE. Yes, it's being executed. It successfully retrieved an email message from another server and converted it into a draft post. If Postie is running, I can assume your plugin is also being run when WordPress cron is being triggered by my wget command?

    I figure I'm misunderstanding something here but can't pinpoint exactly what.

  7. Alin Marcu
    Member
    Plugin Author

    Posted 9 months ago #

    When you set Incoming Links cron type to use own cron, no more cron events are scheduled by Incoming Links! You will use this cron job

    * * * * * wget-qO /dev/null http://yourdomain.com?action=wpmb_check_referrers&secret_key=[your secret key]

    to trigger links' verification.

    When you set Incoming Links cron type to WordPress Cron. The cron events are scheduled as usual, even if DISABLE_WP_CRON is set to TRUE! But as long as DISABLE_WP_CRON is set to TRUE you'll always get that alert/error message.

    The sentence you've quoted above is incorrect, I was probably thinking at "use own cron" option when I wrote that!

  8. oldmankit
    Member
    Posted 9 months ago #

    Thanks for taking the time to explain that.

    When you set Incoming Links cron type to WordPress Cron. The cron events are scheduled as usual, even if DISABLE_WP_CRON is set to TRUE! But as long as DISABLE_WP_CRON is set to TRUE you'll always get that alert/error message.

    If I understand correctly, the plugin will run perfectly with

    • Incoming Links cron type set to WordPress Cron
    • DISABLE_WP_CRON is set to TRUE in wp-config.php
    • The following cron job run to trigger WordPress Cron:

    wget -q -O - http://yourwebsite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    Since it's running perfectly, it seems counter-intuitive to have an error message.

    I know the plugin is in beta, so will give my recommendation. I think that in this situation, anyone who is manually configuring WordPress with wp-config.php will understand that setting that option (DISABLE_WP_CRON) will lead to negative consequences if they don't set-up their own cron job. I don't think people would set that switch by accident. So I would recommend removing that error message. That's just my recommendation - as you can see I'm not an IT expert; I'm just an end user.

  9. Alin Marcu
    Member
    Plugin Author

    Posted 9 months ago #

    Hi,

    We had multiple users reporting back that the plugin is not working and they in fact had DISABLE_WP_CRON set to TRUE.

Reply

You must log in to post.

About this Plugin

  • Incoming Links
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags