I'm looking add-in a bit more speficity to the WP Cron intervals. To add a "weekly" interval, I've done the following:
function re_not_add_weekly( $schedules ) {
$schedules['weekly'] = array(
'interval' => 604800, //that's how many seconds in a week, for the unix timestamp
'display' => __('weekly')
);
return $schedules;
}
add_filter('cron_schedules', 're_not_add_weekly');
Which works great, but - the extra sauce here is getting that cron to run on a specific day:
if( !wp_next_scheduled( 're_not_mail' ) ) {
wp_schedule_event( time(), 'weekly', 're_not_mail' );
}
Anyone have any thoughts on the best way to accomplish this using WP Cron (assuming this isn't per a specific site that we'll have control over their cPanel/CRON area). Thanks!
Update
Going at this full-force and found an article that may have clarified things a bit more, but doesn't exactly answer my question. The basic gist of that article states that the WP Cron isn't as flexible (past the "hourly, daily, weekly" params), so extending it to something like weekly on a certain day seems a bit farfetched.
The issue (calling it an issue out of confusion/frustration) I have with that is -> sure, I could disable WP CRON and have WP CRON run once a week using the server CRON, BUT, that also means that the items that are normally run, like plugin/theme updates, post deletions/publishes based on CRON are put on a backlog for an entire week (if I wanted CRON to run once a week every Monday for example).
I'd have to assume others have come across this, so anymore insight on this would be a huge help. Thanks!
00:00:00
? Or somewhere else?