• Resolved Anonymous User 12055989

    (@anonymized-12055989)


    Hi,
    i’ve developed a plugin for Jigoshop to export orders in XML format.
    I would like to automatically create XML files of my orders each hour without making a user request to the plugin.
    What’s the way to create automatically executed function(in my case, the XML generation function) in WordPress?
    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator bcworkz

    (@bcworkz)

    This function only gets triggered, when a user visits the site !

    Make a real cron job instead, this article describes it: https://tommcfarlin.com/wordpress-cron-jobs/

    Thread Starter Anonymous User 12055989

    (@anonymized-12055989)

    wp_schedule_event() ??

    I managed to create a cron job reading the WordPress Examples.bcworkz, thank you very much!

    @amras, thank you very much too!
    The procedure is very very easy, but is this an agreeable choice?

    The complete guide the cron commands and tools such as wget is outside the scope of this article, but this will trigger an event to fire every 15 minutes that will make a request to your WordPress website thus kicking off any scheduled tasks.

    Moderator bcworkz

    (@bcworkz)

    This function only gets triggered, when a user visits the site !

    Quite true. Not knowing this has confused many people developing on a local installation. A “user visit” in this case means any HTTP request that causes the WP environment to be loaded. On a live site, unless it’s for a brand new domain, or you’ve taken extreme measures to stay hidden, you should be getting enough visits from search spiders, scraper bots, SEO spammers, exploit scanners, etc. to trigger most scheduled events, even if a single human never visits your site.

    If you are at all concerned, or you need the events to fire on a precise schedule, then you need to schedule a true CRON job to ensure this happens when you need it to.

    how change time corne job for send the new mail for register member and what name is the plugin in wp for register in my site

    Moderator bcworkz

    (@bcworkz)

    @tipepanj – the email sent for new registrations is not scheduled, it is sent immediately upon registration. Registrations are handled natively by WordPress, no plugin is needed. If you are not seeing the option on the login page, you need to enable open membership in admin settings.

    If you have more questions, please start your own topic. Tagging on to another person’s topic is against the rules of these forums.

    Thank Very Much my frnd

    Thread Starter Anonymous User 12055989

    (@anonymized-12055989)

    Thank you very much, i managed to do what i wanted to ??
    You can close the post if you want.

    Moderator bcworkz

    (@bcworkz)

    You’re most welcome!

    I have no special powers to close topics. As OP, you can mark this as resolved, which helps the mods keep track of things. Threads are normally left open until a certain time has passed, then they automatically close.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Cron Job’ is closed to new replies.