Secret Code / Cron Job for Email Reminders
- webgeeze
-
Topic Author
- Offline
- Junior Member
-
Less
More
11 years 3 weeks ago #48498
by webgeeze
Secret Code / Cron Job for Email Reminders was created by webgeeze
In the BCC reminder plugin for reminders, there is an entry for 'secret code' with text stating it should be entered when using cron job for email reminders. I am interested to know more on this as I would like more control over when email reminders are fired off.
also, which script executes e-mail reminders?
also, which script executes e-mail reminders?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
11 years 3 weeks ago #48500
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Secret Code / Cron Job for Email Reminders
The code which process sending reminder is located at plugins/system/osmembershipreminder/osmembershipreminder.php
It is a Joomla system plugin. It will be run each time there is someone access to your site. However, the plugin doesn't send reminder every time your site is run. It only process sending reminder of the current time compare to the last time it process sending is more than 30 minutes.
The purpose of having secret code is that :
1. You can setup a cron job to trigger accessing to your site yoursite.com/index.php?secret_code=SECRETCODE
2. By that setup, the plugin will only be run when your site is accessed via cron job, not when someone accessing to your site. It is more reliable than using a system plugin
Hope the explanation is clear.
Tuan
It is a Joomla system plugin. It will be run each time there is someone access to your site. However, the plugin doesn't send reminder every time your site is run. It only process sending reminder of the current time compare to the last time it process sending is more than 30 minutes.
The purpose of having secret code is that :
1. You can setup a cron job to trigger accessing to your site yoursite.com/index.php?secret_code=SECRETCODE
2. By that setup, the plugin will only be run when your site is accessed via cron job, not when someone accessing to your site. It is more reliable than using a system plugin
Hope the explanation is clear.
Tuan
Please Log in or Create an account to join the conversation.
- Krx
-
- Offline
- Senior Member
-
Less
More
- Posts: 59
- Thank you received: 0
9 years 2 months ago #82966
by Krx
Replied by Krx on topic Secret Code / Cron Job for Email Reminders
Hi Tuan
Is this URL still valid even after almost 2 years?
yoursite.com/index.php?secret_code=SECRETCODE
Usually, when some component is triggered via cron,
url has component name in it as well, and in yours its only secret code.
I'm asking it because I plan to activate cron option because we have a lot of users and server mail hourly limit,
so cron is much better option than system run, because we can set amount of mails sent.
Is this URL still valid even after almost 2 years?
yoursite.com/index.php?secret_code=SECRETCODE
Usually, when some component is triggered via cron,
url has component name in it as well, and in yours its only secret code.
I'm asking it because I plan to activate cron option because we have a lot of users and server mail hourly limit,
so cron is much better option than system run, because we can set amount of mails sent.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
9 years 2 months ago #83105
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Secret Code / Cron Job for Email Reminders
Yes. It is still valid but it is not really needed. You can leave the secret_code empty in both the payment plugin and your cron job will just have to call this URL
yoursite.com/index.php
Regards,
Tuan
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Krx
-
- Offline
- Senior Member
-
Less
More
- Posts: 59
- Thank you received: 0
9 years 2 months ago #83112
by Krx
Replied by Krx on topic Secret Code / Cron Job for Email Reminders
Hi
But if I set cron as mysite.com/index.php doesn't this means that OSM reminde rplugin will be run whenever someone visits website?
- Trafic on this website is decent and server is run on shared server
- This approach adds load on server and there is no controll how much mails are sent
- Client on this website already sends a lot of mails via (Acymailing, triggered by Cron as well) newsletter. They also send a lot of mails by using regular mail clients. If they go over quota, visitors and their clients will not receive their emails.
So good control over any other send mails is needed.
So I'm a bit confused with this statement:
"Yes. It is still valid but it is not really needed. You can leave the secret_code empty in both the payment plugin and your cron job will just have to call this URL"
If I set secret code in OSM settings and setup Cron to use url with secret code, does it mean that OSM will send reminders ONLY with cron, and NOT when website is loaded? This would be OK behavior
Thanks
Regards
But if I set cron as mysite.com/index.php doesn't this means that OSM reminde rplugin will be run whenever someone visits website?
- Trafic on this website is decent and server is run on shared server
- This approach adds load on server and there is no controll how much mails are sent
- Client on this website already sends a lot of mails via (Acymailing, triggered by Cron as well) newsletter. They also send a lot of mails by using regular mail clients. If they go over quota, visitors and their clients will not receive their emails.
So good control over any other send mails is needed.
So I'm a bit confused with this statement:
"Yes. It is still valid but it is not really needed. You can leave the secret_code empty in both the payment plugin and your cron job will just have to call this URL"
If I set secret code in OSM settings and setup Cron to use url with secret code, does it mean that OSM will send reminders ONLY with cron, and NOT when website is loaded? This would be OK behavior
Thanks
Regards
Please Log in or Create an account to join the conversation.
- Calum
- Offline
- Elite Member
-
Less
More
- Posts: 257
- Thank you received: 34
9 years 2 months ago #83117
by Calum
Replied by Calum on topic Secret Code / Cron Job for Email Reminders
Krx yes it does mean its accessed but the logic is its accessed every time a user accesses the page but then if its run too recently does nothing.
HOWEVER if you specifically want to only access via the Secret Code then that works ti mean you can tell Cron to access it at 4am and generate the emails when the rest of the traffic is less likely to be active.
HOWEVER if you specifically want to only access via the Secret Code then that works ti mean you can tell Cron to access it at 4am and generate the emails when the rest of the traffic is less likely to be active.
The following user(s) said Thank You: Tuan Pham Ngoc
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.