• Resolved elsurudo

    (@elsurudo)


    Hi,

    Is it possible to invoke the cleanup process – say – nightly? Or does it always need to be done manually?

    In our case, we have an import/sync script for sync our posts with an eternal system, in which we make use of the WP Codex functions to do this – is it possible to call this plugin in a programmatic way, as a part of our import/sync process?

    Thanks for the help

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hello,

    The process is too “intensive” to start it randomly in background. Also, WP-Cron is not perfect (and can’t be since it is started when users explore your website) and will make a terrible experience for users who are unlucky to visit your website at the execution time. Plus it would be extremely difficult to develop, maintain, and more importantly debug. I thought about it many times but it wouldn’t end well 🙁

    Thread Starter elsurudo

    (@elsurudo)

    Hi Jordy,

    Fully understood.

    More specifically, what I am asking is: how can I call this process from my own external code, which already interacts with WordPress using the Codex API (I import WordPress into my own PHP script – which is launched via simple cron)?

    We have a “maintenance window” even night when posts are synced with an external system, which seems like it would be a fine time to also do media cleanup.

    Thanks!

    Plugin Author Jordy Meow

    (@tigroumeow)

    Unfortunately impossible, because the client part (your computer) is gathering the information about the scanning and then calling the server for each file or bundle of files. It’s quite complex and there is a lot of programming involved if the server was capable of doing it, and I don’t think it will work properly at all neither… The clean up really should be done manually with a pair of eyes to look at it closely. It’s not a simple cache/drafts DB cleanup.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Invoking automatically/periodically?’ is closed to new replies.