• Resolved bozzadaniel

    (@bozzadaniel)


    I run the Postie on a few sites and in recent versions running the cron job through WP CLI no longer works. With version 1.9.8 the cron job completes without processing any emails. No error is generated in the server logs.

    As the imports are doing some processing on an attached file in the emails I run the cron jobs through WP CLI as to not affect visitors to the site (the job takes roughly 90-100 seconds to complete). I’ve set maximum execution time to 90 seconds in php.ini, so sometimes the job would be interrupted if it were to be started from the web (WP CLI has no such limit).

    Using the “Process Email” button in the admin panel works.

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

    (@wayneallen-1)

    How are you starting Postie via WP CLI?

    Thread Starter bozzadaniel

    (@bozzadaniel)

    Sorry for the late answer, but here is how I start it:

    wp cron event run check_postie_hook –debug
    or
    wp cron event run –due-now

    I’ve tried with version 1.9.9 and the issue persists.

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Thanks. Looks like wp cli sets up a slightly different environment than regular wp. I was able to find a way for both of them to work. I’ll release the fix in 1.9.10 in a bit.

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

The topic ‘Running cron through WP CLI not working’ is closed to new replies.