WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Batch execution of a PHP script that takes a long time to execute (2 posts)

  1. John Peden
    Member
    Posted 1 year ago #

    Hi folks,

    I've written a plugin that works like a charm on smaller sites backing up the content and the DB. The plugin runs into issues on larger sites however and I'd like to batch process the script. What is the best way of having a simple script, that takes a while to run, execute in batches/chunks and update the user after each successful batch?

    Thanks

    John

  2. John Peden
    Member
    Posted 1 year ago #

    Solution was more in the thought process than the code. I built in a log reader using JS that updated the user at each step and found the best way of completing the operations I wanted (in this case using shell exec to copy files). Sped up the process and kept the user informed throughout.

Topic Closed

This topic has been closed to new replies.

About this Topic