• Resolved drexmeister

    (@drexmeister)


    Hi there,

    Is it possible to trigger the cronjob from another php script? I have made a script to write a csv file on the server (outside of the webroot) from another database. Would like to have that script trigger the cronjob or api hook.

    Regards,

    Jasper

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Javier Carazo

    (@carazo)

    @drexmeister,

    No currently. You can call the wp-cron externally and it will fire all the WP-Cron (including this tasks) but not only this one.

    What you want is some kind of endpoint to call this cron directly, isn’t it?

    Thread Starter drexmeister

    (@drexmeister)

    Hi Javier,

    Thanks for the reply. Triggering all WP-Crons is a bit to much ??

    Yes an endpoint or trigger the function that your cronjob triggers.

    Thanks

    Plugin Author Javier Carazo

    (@carazo)

    I include it into the roadmap to include it in future versions.

    Thanks for the idea. Stay tuned.

    Plugin Author Javier Carazo

    (@carazo)

    @drexmeister,

    What do you think about it? It would be better a custom endpoint in the REST API (a GET one)? Or do you consider any other idea?

    Thread Starter drexmeister

    (@drexmeister)

    Hi there,

    Custom endpoint would be nice in de REST API.

    (and maybe change the name of the cronjob ??

    Thanks

    Plugin Author Javier Carazo

    (@carazo)

    Which method would you suggest? Maybe a GET?

    (and maybe change the name of the cronjob ??

    What do you refer?

    Thread Starter drexmeister

    (@drexmeister)

    GET method would do nice.

    The cronjob’s name starts with Aqui ?? Maybe better to use a abbreviation or your plugins name.

    Thnx

    Plugin Author Javier Carazo

    (@carazo)

    This is not AQUI this is “acui”, and this is the prefix that is used in every part of the plugin.

    Before this name it was called Advanced Customer and User Importer and that’s the reason.

    As soon as we do the REST endpoint I will tell you.

    Thread Starter drexmeister

    (@drexmeister)

    Ah lol,

    My Spanish language knowledge is very bad to non existent ??

    If you want me to do some beta testing let me know.

    Thanks again.

    Plugin Author Javier Carazo

    (@carazo)

    REST API endpoint added.

    Update and you will have in Cron tab how it works.

    Remember you have to make some auth in order to make this sure.

    Thread Starter drexmeister

    (@drexmeister)

    Wow, thats quick!

    Thank you Javier,

    Going to check it out tomorrow.

    Much appreciated!

    Plugin Author Javier Carazo

    (@carazo)

    Tell me then.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘trigger import or cron from other phpscript’ is closed to new replies.