Support » Plugin: Newsletter » status warning with externally triggered cron

  • Resolved Otter Boyd

    (@otterboyd)


    If you are using an externally triggered cron job, do you still get warnings in the status page?

    I’ve set up a cron job at cron-job.org – following the Newsletter instructions which ask it to simply call: https://(MYDOMAIN).com/wp-cron.php at least once every 5 minutes. For testing purposes I’ve set mine to once per minute.

    Cron-job.org reports on every job: Cronjob execution: Successful (200 OK)

    Loading the page (https://(MYDOMAIN).com/wp-cron.php) in a browser produces no errors, just a blank page.

    In WP Config I disabled cron with: define( ‘DISABLE_WP_CRON’, true);

    I installed the WP Control plugin to view cron jobs and do not see any of my external cron jobs from cron-job.org in the events or schedules lists. Not sure if that is normal behavior for that plugin.

    Meanwhile in the Newsletter Status page I continue to see under “Cron Calls”: The blog cron system is NOT triggered enough often.
    Trigger interval: average 488 s, max 4621 s, min 2 s

    The trigger interval average continues to climb upward, suggesting that it’s not detecting any of the cron jobs coming from cron-job.org.

    Is this a case of the external cron job working properly but the Newsletter plugin being unable to detect it?

    Or, is this an indication that the cron jobs from cron-job.org are failing in spite of their “successful (200)” messages? – and if so, how can I fix this?

    Unfortunately I can’t run a server cron through cpanel on my host (hostgator) as they limit cron jobs to once every 15 minutes. My only option is to get this working with an external trigger.

    Thanks for any help or advice with this!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Stefano Lissa

    (@satollo)

    Try to let the system collect enough samples and probably the message will disappear.

    Thread Starter Otter Boyd

    (@otterboyd)

    Thank you Stefano,

    After running the external cron job for 24 hours I continue to see the trigger interval average time increasing. Yesterday when I wrote the original post above it was at 488 seconds, and at this moment is at 911 seconds and continues to rise each time I check on it.

    Last night I disabled all plugins except Newsletter, and put my site in maintenance mode. Having all other plugins disabled had no effect on this cron issue.

    Earlier in the week, before discovering that Hostgator doesn’t allow crons running more frequently than once every 15 minutes, I set up a once-per-minute cron in cpanel using the following command:

    wget -q -O – https://(MYDOMAIN dot com/wp-cron.php?doing_wp_cron >/dev/null 2>&1

    Incredibly it worked and continued to work until Hostgator detected it and throttled it down to once per 17 minutes. During the hours that the once per minute cron was working I could see the cron interval average on the Newsletter status page steadily decreasing until it finally fell within the 300 seconds range.

    Unfortunately Hostgator finally did detect the cron and reset it to once per 17 minutes. It was at this point that I set up an external trigger with cron-job.org following the directions you have provided (and as described in the original post).

    With the short term success I had with a cpanel cron job I have confirmed that my theme and plugins are not the problem.

    Now I am left wondering if the cron job initiated by cron-job.org isn’t producing the necessary trigger, or is working as expected but Newsletter isn’t detecting it. According to my account on cron-job.org all jobs have been successful and always return a “200 OK” status.

    The cron I set up is quite simple: https://(MYDOMAIN dot com)/wp-cron.php
    Request Method: GET

    for testing purposes (to see impact on interval average on Newsletter status page) I’ve set it up for once per minute, and have also tried extended periods at once per 2 minutes and once per 5 minutes.

    All externally run cron jobs I’ve tried from cron-job.org are having zero effect on the Newsletter status page warning for the cron interval average. When I began this reply today that interval was at 911 seconds, and now is at 915, and that is with a once per minute external cron still running from cron-job.org.

    I have exhausted all ideas and don’t know what to try next. Any idea about what might be going on? Thanks Stefano!

    Plugin Author Stefano Lissa

    (@satollo)

    Hi, I suspect the internal cron event is not propagated to Newsletter, I have no other idea. Try to disable and reenable Newsletter since this way it sets up the jobs again.

    Plugin Author Stefano Lissa

    (@satollo)

    If you set the override opt-in option (on subscription configuration panel) it should work.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.