• I disabled WP Cron in the wp-config.php file and set up a cron job to run once every minute because I did not want it to run with every visit to the website. Autoposting works more than 90% of the time but fails a few times. Here is part of the output from the log file below which shows that Post with ID 11435 was scheduled but never got posted to either Twitter or Facebook whereas the posts just before and after were posted correctly.

    Any ideas how to make sure all posts are autoposted all the time?


    [2017-07-18 16:14:10] – [Posted] [Twitter – Twitter] – OK – Message Posted Lungu doesn’t enjoy globetrotting, he squeezes himself in hotels abroad – Kalaba | Post Link
    [2017-07-18 16:14:08] – [Posted] [Facebook – Facebook] – OK – Message Posted Lungu doesn’t enjoy globetrotting, he squeezes himself in hotels abroad – Kalaba | Post Link
    [2017-07-18 16:13:55] – [Start =- ] – —===### NEW AUTO-POST REQUEST PostID:(11449) Automated ###===—
    [2017-07-18 16:13:55] – [*** ID: 11449, Type: post] – Status Changed: draft_to_publish. Autopost requested.
    [2017-07-18 14:19:35] – [Scheduled] [Twitter (Twitter)] – for 1500380382(2017-07-18 14:19:42) PostID:(11435)
    [2017-07-18 14:19:34] – [Scheduled] [Facebook (Facebook)] – for 1500380383(2017-07-18 14:19:43) PostID:(11435)
    [2017-07-18 14:19:34] – [Start =- ] – —===### NEW AUTO-POST REQUEST PostID:(11435) Scheduled +9 ###===—
    [2017-07-18 14:19:34] – [*** ID: 11435, Type: post] – Status Changed: draft_to_publish. Autopost requested.
    [2017-07-18 14:05:20] – [Posted] [Twitter – Twitter] – OK – Message Posted ACC may be trailing Kambwili, not police – Amos Chanda | Post Link
    [2017-07-18 14:05:18] – [Posted] [Facebook – Facebook] – OK – Message Posted ACC may be trailing Kambwili, not police – Amos Chanda | Post Link
    [2017-07-18 14:04:01] – [Scheduled] [Twitter (Twitter)] – for 1500379449(2017-07-18 14:04:09) PostID:(11432)
    [2017-07-18 14:04:01] – [Scheduled] [Facebook (Facebook)] – for 1500379448(2017-07-18 14:04:08) PostID:(11432)
    [2017-07-18 14:04:01] – [Start =- ] – —===### NEW AUTO-POST REQUEST PostID:(11432) Scheduled +6 ###===—
    [2017-07-18 14:04:00] – [*** ID: 11432, Type: post] – Status Changed: draft_to_publish. Autopost requested.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author NextScripts

    (@nextscripts)

    Please go to the help/support/about tab and check the cron test results. Please re-do the test if it’s old.

    Thread Starter Lethalmiko

    (@lethalmiko)

    Did the test several times but it doesn’t do anything. Even enabled WP Cron but it still does nothing when I click on the reload button. The cURL test works.

    “Check is not started yet… Please reload this page in couple minutes.”

    Thread Starter Lethalmiko

    (@lethalmiko)

    Finally worked though some posts still fail to be autoposted.

    Cron Check Results:
    ==== Cron was executed 11 times in 15 minutes ===

    Your WP Cron is OK

    Technical Info:

    
    Array
    (
        [cronCheckStartTime] => 1501750493
        [cronChecks] => Array
            (
                [0] => [2017-08-03 10:54:52] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [1] => [2017-08-03 10:56:11] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [2] => [2017-08-03 10:58:23] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [3] => [2017-08-03 10:59:11] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [4] => [2017-08-03 11:00:41] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [5] => [2017-08-03 11:02:19] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [6] => [2017-08-03 11:03:47] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [7] => [2017-08-03 11:05:11] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [8] => [2017-08-03 11:06:41] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [9] => [2017-08-03 11:08:16] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [10] => [2017-08-03 11:09:42] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
            )
    
        [status] => 1
    )
    
    Plugin Author NextScripts

    (@nextscripts)

    Your cron is not set correctly and that’s what is causing your troubles.
    Here:
    http://www.nextscripts.com/tutorials/wp-cron-scheduling-tasks-in-wordpress/

    Thread Starter Lethalmiko

    (@lethalmiko)

    OUTPUT AFTER MAKING RECOMMENDED CHANGES

    Cron Check Results:
    ==== Cron was executed 11 times in 15 minutes ===

    Your WP Cron is OK

    Technical Info:

    
    Array
    (
        [cronCheckStartTime] => 1501798022
        [cronChecks] => Array
            (
                [0] => [2017-08-04 00:07:01] - WP Cron called from 144.217.xx.xxx (Mozilla/5.0 (Windows NT 6.1; WOW64))
                [1] => [2017-08-04 00:07:40] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [2] => [2017-08-04 00:09:08] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [3] => [2017-08-04 00:11:42] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [4] => [2017-08-04 00:12:06] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [5] => [2017-08-04 00:13:37] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [6] => [2017-08-04 00:15:19] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [7] => [2017-08-04 00:16:42] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [8] => [2017-08-04 00:18:06] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [9] => [2017-08-04 00:20:22] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
                [10] => [2017-08-04 00:21:08] - WP Cron called from 144.217.xx.xxx (WordPress/4.8.1; https://somewebsite.com)
            )
    
        [status] => 1
    )
    
    Thread Starter Lethalmiko

    (@lethalmiko)

    The proposed solution for the cron is still not working. Just today another post failed to go through on Facebook. And now there is another problem whereby for Facebook autoposts, it fails to pick up the correct featured image. Instead it picks the avatar of the author.

    On “post type”, I had set the system to pick “Text Post with ‘attached’ link” months ago. It used to work but now with this change in the cron settings, it no longer works as before. Other social networks are working fine except facebook. The “og:” tags are all set and showing in the page html source code.

    I also added to the functions.php this code

    add_filter(‘http_request_timeout’, function(){return 60;});

    • This reply was modified 6 years, 8 months ago by Lethalmiko.
    Thread Starter Lethalmiko

    (@lethalmiko)

    From the log file today:

    [Error] [Facebook - Facebook] - -=ERROR=- ERROR: nxs_Error Object ( [errors] => Array ( [http_request_failed] => Array ( [0] => Connection timed out after 45001 milliseconds ) ) )

    I have seen the explanation about timeouts from the nextscripts website about the system binary library but it is not satisfactory because why does Twitter work every single time? Why doesn’t it also suffer from timeouts?

    https://www.nextscripts.com/support-faq/

    Plugin Author NextScripts

    (@nextscripts)

    1. Your cron is still not set correctly. The log shows calls from “WordPress/4.8.1”. it’s not suppose to be there.

    2.

    >>why does Twitter work every single time? Why doesn’t it also suffer from timeouts

    It’s a question for your server admin or hosting provider.

    Thread Starter Lethalmiko

    (@lethalmiko)

    What do you mean the cron is not set correctly? I copied and pasted what you put on your own website (editing the URL of course) as follows:

    curl -s -H “User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64)” https://somewebsite.com/wp-cron.php?doing_wp_cron

    Secondly, it doesn’t make sense for the library on the server to fetch Twitter perfectly every time but only fail when it comes to Facebook. That suggests there is something wrong with the way your plugin is set up to do Facebook autposts and as you can see from the posts above, there are several of us who have experienced this. surely this is not just a coincidence.

    I run a VPS and I am the admin. I installed it from an image from the VPS provider and I assume they know what they are doing with respect to libraries and all that. I suggest you just do a thorough investigation rather than shifting the blame to hosting providers and server libraries.

    • This reply was modified 6 years, 8 months ago by Lethalmiko.
    Plugin Author NextScripts

    (@nextscripts)

    1. When cron set correctly Cron test shows only steady calls from “(Mozilla/5.0 (Windows NT 6.1; WOW64))”. Your log shows 1(!) call from (Mozilla/5.0 (Windows NT 6.1; WOW64)) and bunch of calls from “WordPress/4.8.1”. This is NOT correct.

    2. Why it doesn’t make sense? Your hosting provider has a very nice and stable uplink to the nearest Twitter server, while it’s connection to Facebook is unstable and packets are getting lost. If you regularly getting this problem, please ask your hosting provider to debug the connection to graph.facebook.com

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Autoposting sometimes fails’ is closed to new replies.