News:

Wondering if this will always be free?  See why free is better.

Main Menu

How to get instant email notifications?

Started by willemb, May 13, 2022, 10:07:33 AM

Previous topic - Next topic

Johnfromhere

I couldn't manage to sort a cron job.

As I said, the forum I run has less than 40 members (in fact nearer 20!).
Is there a parameter I can alter or just paste the code quoted above into the requisite file?

Any help gratefully received.

Cheers.

John.

Johnfromhere

I need to do something to get email sent to my (at most 20) members immediately they are posted.  I am not au fait enough with setting up a cron job.

I do not want to disable stuff you wrote Arantor, simply to modify it to meet MY needs.

Can anyone help, please?

Many thanks in anticipation.

Cheers.

John.

Sesquipedalian

SMF sends emails in batches of 50, which means that on a forum as small as yours, a single call to SMF's cron.php file will send them all.

In the scenario you are concerned about—namely, sending notifications about new posts as soon as they are made—SMF's default "web cron" method should be completely sufficient. After a user submits a post, the very next page load will trigger the background task to run.

If the notifications are not being sent immediately to everyone, the most likely cause is that some or all of your users simply haven't chosen to be notified immediately about new posts in their notification preferences.

SMF's default for this is "Immediately, but only for the first new message," which means that only one notification will be sent until the next time the user logs in. The other options are immediately, once per day, and once per week.

To be notified immediately about every new post individually, users need to update their notification preferences to select that option. As an admin, you have the power to change that preference for them, but you should generally only do that after confirming with the user that that's really what they want. Sending notifications to people more often than they want usually annoys them and drives them away.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

Johnfromhere

Many thanks.

I'll keep an eye on it.

Thanks again.

Cheers.

John.

Johnfromhere

My forum has 29 members and a posting notification took 2+ days to arrive after the posting! I admit that the forum is (incredibly) quiet at the moment but is there any way apart from setting up a cron job to load the page to nowhere?

I accept the fact that you won't get any more notifications until you read the posting you have been notified about.

Sorry but I don't understand:-
QuoteThe other options are immediately, once per day, and once per week.

Cheers.

John.

willemb

John, I think your options are:
  • Theach all 29 members to 'hard refresh' the page after they posted somthing
  • Reconsider your cron options. Any shared webhosting I've seen has it, but it is always hidden somewhere deep in the control panel (cPanel, DirectAdmin, Plesk etc). Ask your provider
  • It doesn't have to run on the same server. You could set op some other trick that just accesses your home page every half hour or so.

Johnfromhere


Advertisement: