Support Forum
Superiors are requesting the weekly digest subscribers we have be sent the email every Friday at 8AM EST.
I was looking around the plugin files and found this area within sp-subscriptions-plugin.php:
$subs = sp_get_option('subscriptions');
$interval = ($subs['digesttype'] == 1) ? (60*60*24) : (60*60*24*7);
$schedules['sp_subs_digest_interval'] = array('interval' => $interval, 'display' => __('SP Subscription Digest Interval'));
return $schedules;
}
I'm stabbing in the dark here, but it seems like the messages are sent 24hrs (for daily) or 168hrs (for weekly) from the time someone subscribes.
Would this (line 657) be the appropriate place to define the release for Fridays @ 0800?
I suppose another, more laborious solution, would be to manually re-subscribe our users (well over 100) as quickly as possible next Friday morning.
If you need something to happen at a precise set time on a periodic basis then you would need to install some sort of scheduling application. There may well be some sort of WP plugin that would do this - it is not something I have ever looked in to.
Meanwhile we have CRON and the WP CRON Scheduler. And this is what the subs digest uses. Yes - this does schedule an event to take place at a set time and date. But... it IS dependent upon a user visiting the site. So - if nobody happens to be loading a page from the site at the specified time the event will wait until someone does. This makes it hard to be precise of course. But it is how it works.
But you can get close by setting the scheduled time of the next event to be more or less when you want it to happen. But I am not actually sure of the best way to to do that and will need to get some advice although it might be discussed in the WP codex.
YELLOW
SWORDFISH
|
Interesting info Yellow Swordfish; I forgot about that section in the Toolbox.
After poking around the Codex a bit (the search system in there leaves much to be desired btw) there doesn't seem to be much of anything posted about the Toolbox, let alone CRON.
If I understand you correctly, someone must be logged into the forum before any CRON hook will run?
1 Guest(s)