After I completed my CODE and finished my site, I now have another problem. I use a plugin called WP All Import to import my products. I want that the different imports are executed by WP All Import in a certain order.

So e.g. I have 3 Import:

  • Import A
  • Import B
  • Import C

I want that my Cron triggers the Import A and execute this import and only after Import A is completed, I want that Import B gets triggered and executed. But exactly this is my problem. Because I must find a way to recognize if an import is completed.

So, I have two ideas:

  1. Working with the return statement from the called URL: {"status":200,"message":"#79 Cron Job ausgel\u00f6st"}. But there is one problem: to trigger the imports is no problem, but if I want to execute them, I always get a timeout because the import needs about 30-60 mins (each import). So, the PHP script fails because of timeout.

    My question regarding the first idea is, how can I recognize via URL if an import is completed?

    I also can’t call the URL without any timeout, because if the import is finished, it will ignore the return.

  2. My second idea is to create a text file at the end of the import, which tells me that the import is finished. I use pmxi_after_xml_import for that. It is working. At the end of the import, I create a file. So, I could just execute the URL without waiting for a return and check if the file exits. But exactly here is the problem. The file is just not being created by the import if I execute the cron via URL without waiting for a response. But the curious thing is that the file is being created if I execute the import by hand in the backend. So, how can that be?

How can I solve my problem and recognize if one import is completed?

  • Does nobody has a idea? – Fraze Jr. Mar 11 '17 at 9:49
  • You might be better off asking in the plugin support forum on WordPress.org, so you can get an answer from the author of the plugin or other users – shea Mar 18 '17 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.