How to submit a button automatically after every scheduled hours?

You were on the right track with the second try. Put this is functions.php, or wherever: if (!wp_next_scheduled(‘fetch_webcategories_hook’)) { wp_schedule_event( time(), ‘hourly’, ‘fetch_webcategories_hook’ ); } add_action ( ‘fetch_webcategories_hook’, ‘fetch_webcategories’ ); It’s not quite a real hourly schedule because somebody has to visit the site to trigger it, so if you have VERY low traffic it … Read more