Logged-out Users Run Your WordPress Cron Jobs

💡 Code that works in a plugin might not behave the same in a scheduled wp-cron job. Things That Don’t Always Work in WordPress Cron Jobs get_posts() calls that return posts with unpublished statusesWorkaround: use $wpdb queries to retrieve posts…