1 replies
Hi Warriors,

We have a WP Plugin, which connects remotely to a database, it pulls articles / posts using WP-cron.php. The issue is if for some reason the cron is unsuccessful (timeout, no new posts, etc), it never triggers again.

Looking for someone that knows how to add custom crons within the plugin, that will not require the end user to have to fiddle with setting up cpanel.

Came across this codex Plugin API/Filter Reference/cron schedules « WordPress Codex

Just out of ideas, (tried various methods found on the net).

Thanks.
#issues #wpcron
  • Profile picture of the author kokopelli
    Don't know how to do it, sorry, but here are two articles with some examples of implementing WordPress' pseudo cron in a plugin/functions.php that may help:

    Pseudo cron jobs with WordPress

    Timing is everything: scheduling in WordPress | Development on a shoestring

    Please note, however, that WordPress' quasi cron is only triggered when someone actually visits the site, so a cPanel cron job would still be best, especially in a low volume site.

    Alternatively, you could advise the client/site owner to set up a cron job via a free external service, such as setcronjob.com, or the others you'll find via Google.


    Good luck and Happy Holidays!
    Signature
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    {{ DiscussionBoard.errors[5273917].message }}

Trending Topics