• Resolved Rick Hellewell

    (@rhellewellgmailcom)


    The docs indicate that using https://www.example.com/wp-cron.php will start the “process email” process, just the same as a manual click of the ‘process email’ on the Postie settings page. But any pending emails are not processed with the CRON job, even though the ‘test settings’ output shows messages waiting.

    I have verified that the CRON job is running. The output of the CRON job is similar to this:

    
    --2019-11-28 12:00:22--  https://www.example.com/wp-cron.php
    Resolving www.example.com... 173.254.30.26
    Connecting to www.example.com|173.254.30.26|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: unspecified [text/html]
    Saving to: “wp-cron.php.215”

    Which shows that the request completed properly (200 status). But mail is still pending. This happens with a CRON scheduled job, and a manual access of https://www.example.com/wp-cron.php …. mail still pending and not processed.

    How to resolve this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    Your site still needs to be ready to process the cron job. I.e. the setting needs to be something other than “check manually” something like 5 min should work.

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    The check is set for every 30 minutes in Postie settings. The CRON job is set for every 3 hours.

    This is on a multisite. The failure seems to happen randomly; not a specific sub-site. Also doesn’t appear to be a timeout or too-large image files. If I run the ‘test config’ and see that there is email pending (usually just one or two emails), then run the ‘process mail manually’, the mail is processed properly.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Are you accessing the wp-cron.php for each site? Or just the main site?

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    I created a plugin called “Multisite Postie CRON Creator” (last week, available via the repository).

    It loops through all site(s) (single or multisite), creating a text file with the URL of each site plus the wp-cron.php . Then it creates a CRON command line that uses that text file as input.

    That CRON file is run every three hours – I manually added it to the CRON list via my hosting interface. I set the CRON file to email me the results; an extract is what was shown in my initial question.

    I have verified that sometimes email is not processed, even though the CRON results show a status of 200.

    You are welcome to try out the plugin on your test site, but the CRON file it creates works well, with separate commands for each sub-site. The plugin also works on single sites.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Doing a wget on <mysite>/wp-cron.php is the right thing to do, but WordPress controls what actually happens. I often use one of the cron plugins so I can see exactly what WordPress thinks should happen. I would start there to diagnose the issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘CRON jobs not processing mail’ is closed to new replies.