Skip to Content Skip to Menu

🌟Discover the Joomla AI Plugin that wrote its own story! - CB Editor Assistant 1.1now for Joomla 3, 4 & 5!
✍️ 5-Day Free Trial, then 🎯 save up to 30% with our 🛍️ Intro Offer (First 50 users, ends Dec. 25th)
🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

mailer question about time windows

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 11 months ago - 11 years 11 months ago #217806 by ThePiston
mailer question about time windows was created by ThePiston
I'm setting up an email for a 1-week notification before expiration date. So, if I set it up as one week does that mean it'll send an email to everyone who has an expiration of 1 week and earlier? (i.e., 6 days before, 5 days before, etc.?)

If so, does that mean I should set the "But do not send message if it's later than:" to 6 days?

I want to set up a window so that only the users with an expiration date in the 7 day window will get the email. not anyone with 6 days or earlier. just that one day window.

oh, and I'm also using a cron sent once a day.

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X
Last edit: 11 years 11 months ago by ThePiston.

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
11 years 11 months ago #217816 by nant
Replied by nant on topic Re: mailer question about time windows

ThePiston wrote: I'm setting up an email for a 1-week notification before expiration date. So, if I set it up as one week does that mean it'll send an email to everyone who has an expiration of 1 week and earlier? (i.e., 6 days before, 5 days before, etc.?)

If so, does that mean I should set the "But do not send message if it's later than:" to 6 days?

I want to set up a window so that only the users with an expiration date in the 7 day window will get the email. not anyone with 6 days or earlier. just that one day window.

oh, and I'm also using a cron sent once a day.


So if you have a once a day cron job then (assuming that the job executes the second cron job link to fill and empty queue) your queue will be populated every day with users who have an expiration data based on the settings you configured.

So, if you configured to send mailer item to all users that are to expire within the next 6 days, then the first time you execute this you will get all users that meet this criteria. So you will get users that will expire in 6 days, in 5 days, in 4,3,2,1,today.

The second time you execute you will get users that are just getting in the 6 day window (so these that will expire in 6 days).

Hope its clear and makes logical sense.

Once a mailer notice for a specific user is processed and nothing has changed for this user, then the next mailer instance will not affect this user. So if for example you have already sent a user a notice that his subscription will expire then the next day cron job will not touch this user again (but the cron job next year might send the same user a new notice for a new expiration).

Of course you can test all of this locally.

Please Log in or Create an account to join the conversation.

  • ThePiston
  • ThePiston
  • OFFLINE
  • Posts: 334
  • Thanks: 26
  • Karma: 1
11 years 11 months ago #217821 by ThePiston
Replied by ThePiston on topic Re: mailer question about time windows
to be honest, I'm more confused. Why would the dropdown have options for "1 week/7 days" when this option actually means "7 days and less"? To me it would mean "a 24 hour period 7 days from now".

Am I the only one who thinks that it should only choose users from a 24 hour period in 7 days when you choose that option?

How would I set up an email to send out an email to those who were expiring in 30 days? Would it send out an email to everyone expiring in 30 days or less if I chose the 30 day option?

CB 2.3, CBsubs 4.3, PHP 7.1, J! 3.9.X

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
11 years 11 months ago #217822 by nant
Replied by nant on topic Re: mailer question about time windows

ThePiston wrote: to be honest, I'm more confused. Why would the dropdown have options for "1 week/7 days" when this option actually means "7 days and less"? To me it would mean "a 24 hour period 7 days from now".


I see option:

1 week (7 days) before

which imo is clear.

so in our case we use something like the following settings:

Automatically send message at following date: 1 week (7 days) before
Relative to this date of the plans below: Subscription's expiry date
To which plans this date condition applies: choose your plan
Must be in state: Active
But do not send message if it's later than: we have 2 hours before

So in this case the very first time this mailer is triggered all users that are have their subscription expiring withing the next days will be placed in the queue.

The next time the mailer is executed all additional subscriptions that entered the 7 day window will also be added to the queue.

The last parameter (But do not send message ...) is used in case something happened and items in queue were not flushed (example cron job failed) - so we do not actually send messages that were queued earlier to members that are almost already expired.

You can set this up as you wish and it really depends on your cron job strategy.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum