Cron Task Hooks is a super simple WordPress plugin that allows you to dynamically hook functions onto a scheduled task.
Install the plugin, and then hook the function you want to run onto either of these actions:
ct_cron_hourly
- runs hourlyct_cron_twicedaily
- runs twicedailyct_cron_daily
- runs daily
function do_this_hourly() {
// stuff
}
add_action('ct_cron_hourly', 'do_this_hourly');
Due to how the schedules are initialized, the scheduled tasks may not necessarily run on the hour. This means that if you want something to run at a specific time, then this plugin will not help you. This plugin is designed to run tasks at a specific interval (i.e. hourly or daily), not time.