I am trying add-in a bit extra speficity to the WP Cron intervals. So as to add a “weekly” interval, I’ve completed the next:
operate re_not_add_weekly( $schedules ) {
$schedules['weekly'] = array(
'interval' => 604800, //that is what number of seconds in per week, for the unix timestamp
'show' => __('weekly')
);
return $schedules;
}
add_filter('cron_schedules', 're_not_add_weekly');
Which works nice, however – the additional sauce right here is getting that cron to run on a particular day:
if( !wp_next_scheduled( 're_not_mail' ) ) {
wp_schedule_event( time(), 'weekly', 're_not_mail' );
}
Anybody have any ideas on one of the simplest ways to perform this utilizing WP Cron (assuming this is not per a particular website that we’ll have management over their cPanel/CRON space). Thanks!
Replace
Going at this full-force and located an article which will have clarified issues a bit extra, however does not precisely reply my query. The fundamental gist of that article states that the WP Cron is not as versatile (previous the “hourly, each day, weekly” params), so extending it to one thing like weekly on a sure day appears a bit farfetched.
The difficulty (calling it a difficulty out of confusion/frustration) I’ve with that’s -> positive, I may disable WP CRON and have WP CRON run as soon as per week utilizing the server CRON, BUT, that additionally implies that the objects which can be usually run, like plugin/theme updates, put up deletions/publishes based mostly on CRON are placed on a backlog for a complete week (if I wished CRON to run as soon as per week each Monday for instance).
I would must assume others have come throughout this, so anymore perception on this might be an enormous assist. Thanks!