Initialize WordPress environment to use in a real cron script

I have to run a PHP script through real cron (WP cron being too unreliable). Within that script, I need $wpdb to insert data into WordPress table. But of course $wpdb will not be available as WordPress would not be initialized. Right? So, my question is how to ‘include’ WordPress/initialize WordPress environment to do such tasks? How about
require_once(“wp-load.php”)?

Related posts

Leave a Reply

2 comments