I'm running a cron every 5:th minute that inserts a lot of posts. Sometimes it happens that those crons are running both at the same time. To be sure that not causing duplicate posts. I would like to use sql lock tables during an insert. But that is problematic with
wp_insert_post() since that is doing stored sql processes.
Would not like to use regular SQL's since I don't get the benefits of everything
wp_insert_post() does. And could be affected by future wp updates as well.
Is there any way to use
wp_insert_post() WITH locked tables?