Another developer has created a plugin for me that imports some data from an XML feed, before it imports it runs a function that deletes the existing items, then runs the import function. These both sit inside a class in the plugin.
I need this to run at 6am and 6pm each day, running the delete function first, then the import function.
Currently, the functions are called via a button the admin (the entire admin interface has been made using Vue, I’m not familiar with Vue at all).
What’s the best way to do this?
I’d be happy to use WP CRON or set up a CRON in cpanel (or both).
Read more here:: Plugin with functions inside a class & how to trigger WP CRON