if (!wp_next_scheduled('chatgpt_auto_blog_cron')) { wp_schedule_event(time(), 'daily', 'chatgpt_auto_blog_cron'); // Adjust frequency as needed (e.g., 'daily', 'every_three_days') } // Schedule the cron job when the plugin is activated function chatgpt_schedule_cron_job() { if (!wp_next_scheduled('chatgpt_auto_blog_cron')) { wp_schedule_event(time(), 'daily', 'chatgpt_auto_blog_cron'); // 'daily' is the default frequency } } register_activation_hook(__FILE__, 'chatgpt_schedule_cron_job');