Can PHP cron work with standard WordPress hooks?

[ad_1]

I was trying to schedule a cron job from within functions.php, but it wasn’t working so I pulled the function into a PHP cron job, and then added a line to run the function right after that.

I saved this as an event in WP Crontrol, but the function I wrote includes wp_update_post and wp_set_object_terms My question is whether PHP cron will work this way, when the PHP code is separate from my functions. Can it use WordPress hooks?

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer