• Resolved trevorstokes

    (@trevortokes)


    In Advanced setting I have the default for Newsletter task scheduler (cron) – “Visitors to your website”

    But viewing the access log I see Mail Poet Cron running almost exactly every 20 seconds, regardless of whether there are active visitors.

    I see a note in the revision history “Remove MailPoet Trigger” and you are using only MailPoet\Cron\Triggers\WordPress

    We were receiving 503 and 508 errors and it seems to point at cron_daemon.

    Are you aware of any problems with your recent change? Could our “Service Unavailable” be related?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Dani F. a11n

    (@danielinhou)

    Hi there @trevortokes ????!

    Thank you for reaching out to MailPoet Support!

    While I haven’t heard of other similar reports, my recommendation, if you are having issues with the default visitors task scheduler, would be to switch to the Server Side Cron (https://kb.mailpoet.com/article/257-setting-the-server-side-cron-linux-cron)

    Please give that a try and let us know if that helps.

    Cheers!

    Thread Starter trevorstokes

    (@trevortokes)

    Thanks for the reply.
    I tried the crontab job that MailPoet generated.

    php /home/georgianyacht/public_html/wp-content/plugins/mailpoet/mailpoet-cron.php /home/georgianyacht/public_html/

    And no emails got sent.

    I looked on github 3.89.0 and it suggests that MailPoet’s own task scheduler was replaced. But the generated cron job still has mailpoet-cron.
    Could it be that the generated command line is out of date?
    Also, with the “Visitors to web site” setting I was still seeing cron in the server access logs at almost exactly every 20 seconds.

    • This reply was modified 2 years, 5 months ago by trevorstokes.
    Plugin Support Dani F. a11n

    (@danielinhou)

    Hi again ????,

    I tried the crontab job that MailPoet generated.

    Could you please reach out to your hosting service and ask them to review the logs to see if there is any error associated with the Cron job?

    Could it be that the generated command line is out of date?

    No, the command line described in the tutorial and your MailPoet plugin should be OK.

    Also, with the “Visitors to web site” setting I was still seeing cron in the server access logs at almost exactly every 20 seconds.

    That is really odd because it should be triggered by visitors to your site, and those are not normally coming so regularly. This is why I suggested to try with the cron job instead.

    Looking forward to hearing from you!

    Cheers

    Thread Starter trevorstokes

    (@trevortokes)

    Hi,
    I verified that the advanced settings show “Visitors to your web site.”
    As proof, I also ran the php script from the command line and it reported that MailPoet is not configured to run with Linux Cron.

    Here is a section of the Access Log from today, still with the “Visitors” setting. It’s every 20 S, even when there are visitors.

    173.209.50.138 - - [16/Jun/2022:07:20:04 -0400] "POST /?mailpoet_router&endpoint=cron_daemon&action=run&data=eyJ0b2tlbiI6InFrNnA3In0 HTTP/1.1" 200 - "https://www.georgianyachtclub.com/?mailpoet_router&endpoint=cron_daemon&action=run&data=eyJ0b2tlbiI6InFrNnA3In0" "MailPoet Cron"
    173.209.50.138 - - [16/Jun/2022:07:20:23 -0400] "POST /?mailpoet_router&endpoint=cron_daemon&action=run&data=eyJ0b2tlbiI6InV5Z2lqIn0 HTTP/1.1" 200 - "https://www.georgianyachtclub.com/?mailpoet_router&endpoint=cron_daemon&action=run&data=eyJ0b2tlbiI6InV5Z2lqIn0" "MailPoet Cron"
    173.209.50.138 - - [16/Jun/2022:07:20:43 -0400] "POST /?mailpoet_router&endpoint=cron_daemon&action=run&data=eyJ0b2tlbiI6ImoxaTJ6In0 HTTP/1.1" 200 - "https://www.georgianyachtclub.com/?mailpoet_router&endpoint=cron_daemon&action=run&data=eyJ0b2tlbiI6ImoxaTJ6In0" "MailPoet Cron"
    

    With the setting changed to “Server Side cron” I can run the php script from the command line with no errors. I have access to the logs via CPanel.
    However, a test email doesn’t go out until I manually run the command from the command line.

    Cron is set up for every minute and the path is the full path.
    So I will reach out to the provider. My apologies – as it may simply be that cron isn’t running.

    P.S. The documentation you referred me to still lists three options. Visitors, MailPoet’s script or cron.

    Thread Starter trevorstokes

    (@trevortokes)

    Support at our web host added the absolute path to invoke php and I think it’s working now.
    /usr/local/bin/php /home/georgianyacht/public_html/wp-content/plugins/mailpoet/mailpoet-cron.php /home/georgianyacht/public_html/

    Strange, because in CPanel’s terminal environment I can invoke ph with your script or -v to confirm the version. etc.

    Thanks for your help.
    Hopefully the 503s etc. will go away.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘MailPoet Cron – Not Triggered by Page Loads’ is closed to new replies.