SMS Reminders config

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
2 months 3 weeks ago #26700 by Steve Klund
SMS Reminders config was created by Steve Klund
Hello All!

I think I'm missing part of the confguration HOW-TO. I have installed the Twillo module to send SMS reminders and following the coding as outlined. When an appointment is created, the customer receives the SMS confirmation. When I select appointments from the "Frount Desk" view, it is sent.

What I cannot find is the instructions to set the reminders 'x' days prior in a cronjob. I saw it somewhere, but cannot find it now.

Can you point me to the cronjob script?

There is a module installed named: Email Reminders for ABPro, but this appears to be for emails not SMS messages. It allows selecting number of days to send prior the the appointment (although it does not specify min / max days ).

What is my brain missing?

Please Log in to join the conversation.

More
2 months 3 weeks ago #26701 by Rob
Replied by Rob on topic SMS Reminders config
There are 2 plugins, one for email reminders and one for SMS reminders.

appointmentbookingpro.com/reminder-cron-module-sms

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
2 months 3 weeks ago - 2 months 3 weeks ago #26702 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
Installed both the mod_sv_reminders and mod_sv_reminders_sms modules

pasted the URL to verify path for both (see attached)


Configured both modules (see attached)

tested from calendar (see attached)


From command line, tried to execute the reminder and receive this error:


stevek@rce1tasc:/var/www/html/modules/mod_sv_reminders_sms$ ls

mod_sv_reminders_sms.php mod_sv_reminders_sms.xml reminders_cron_sms.php show_path.php

stevek@rce1tasc:/var/www/html/modules/mod_sv_reminders_sms$ php reminders_cron_sms.php

PHP Notice: Undefined index: SERVER_NAME in /var/www/html/modules/mod_sv_reminders_sms/reminders_cron_sms.php on line 57
No valid componentstevek@rce1tasc:/var/www/html/modules/mod_sv_reminders_sms$


What am I doing wrong to run this from command?
Attachments:
Last edit: 2 months 3 weeks ago by Steve Klund.

Please Log in to join the conversation.

More
2 months 3 weeks ago #26703 by Rob
Replied by Rob on topic SMS Reminders config
See the "Testing" section at the bottom of ..
appointmentbookingpro.com/reminder-cron-module-sms

You need to put the module in "Test mode", then call the http URL from the browser.


The show path utility gives you the path that you set in CRON, to test manually, you are calling a simple http URL in the browser.

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
2 months 3 weeks ago #26704 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
OK, read the section on "Testing"

put this in address bar of my PC : mywebsite.org/modules/mod_sv_reminders_s...minders_cron_sms.php

Text appeared: "This tool can only be executed from cron"

So,,, does this mean it is installed correctly?

I think I can test in by creating an appt 3 days from now + 1 hour, wait to see if it runs (sms module set to send appts 72 hrs away

This brings another question,, if the module is required to have cron run hourly, and the module is configured to :
Do Not Call Before 0800
Do Not Call After 1900

Does that mean any appointment starting between 0800 - 0900 will be send a Text at 0800?

Please Log in to join the conversation.

More
2 months 3 weeks ago #26705 by Rob
Replied by Rob on topic SMS Reminders config

Text appeared: "This tool can only be executed from cron"

That indicates you have not set the module into 'Test' mode' in the Module setup screen.
In test mode it will run interactively and give you a warning to turn off test mode before going live.


The ABPro SMS cron module will block sending, between the designated times to prevent nighttime SMS to your customer.
It will not alter (or resend) any messages that would come up during the blocked time, it just prevents them from being sent.

If you want to send a reminder to a person with an 8:00AM appointment, you might setup a reminder to go out 15 hours before the booking. That way the 8:00AM appointment will get a text at 5:00PM the day before.

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
2 months 3 weeks ago - 2 months 3 weeks ago #26706 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
Thanks for the help!

I ensured each module (sms and email) were in Test Mode = Yes and I get the error of only in cron. I change setting Test Mode = NO, and get the same error.

If I run the routine from the front desk, clicking on "Send SMS Reminder" it sents the reminder regardless of Test Mode = On / off
The same is tru for email reminders.

It seems teh system is sending when triggered. I'll build a few cron jobs and ensure that works as well.

I am still unclear on the scheduling of the SMS.... we have numerous offices with different time slots for appointments, 0800; 0830; etc. So the question is:

If appointments at different locations start at different times, ( ex: 0800; 0830; 0845; 0915; 0930, etc) does the cronjob need to match the exact time, or, as the manual states, it must run hourly, will the cronjob at 0800 send reminders for all appointments between 0800 - 0900?
OR, if an appointment starts at 0800; 0815; 0830; will I need to create 3 seperate cronjobs?

Forgot to ask,,,,,, the cron job,,, does it need to be run as root?
Last edit: 2 months 3 weeks ago by Steve Klund.

Please Log in to join the conversation.

More
2 months 3 weeks ago #26707 by Rob
Replied by Rob on topic SMS Reminders config

If I run the routine from the front desk, clicking on "Send SMS Reminder" it sents the reminder regardless of Test Mode = On / off

The front desk is part of ABPro, the cron module is different code.

in Test Mode = Yes and I get the error

?? Sounds like the cron job is not able to read the parameter.

will the cronjob at 0800 send reminders for all appointments between 0800 - 0900?

Yes.

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
2 months 3 weeks ago #26708 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
I am getting much closer to the solution.....
I now am running into this error:

steveklund@testsvr:/var/www/html/modules$ php -d memory_limit=-1 /var/www/html/modules/mod_sv_reminders_sms/reminders_cron_sms.php
PHP Notice: Undefined index: SERVER_NAME in /var/www/html/modules/mod_sv_reminders_sms/reminders_cron_sms.php on line 57
No valid componentsteveklund@testsvr:/var/www/html/modules$


I increased memory_limit in php.ini to 256, still errored.. then added the switch = php -d memory_limit=-1 to the frount of the line. No memory error, but gives me an error in the remiders_cron_sms.php file. I do not see anything referring to a server name

When I run hostname command is shows = testsvr which is what I labeled the physical server when installing ubuntu. Do I need to change that to match the website? ie hostname = region1 for region1.com FQDN?

Sorry for the frustrations.

Please Log in to join the conversation.

More
2 months 3 weeks ago #26709 by Rob
Replied by Rob on topic SMS Reminders config
Sorry, I have never encountered or had reported the error you are seeing.

Might be best to run it by your hosting support, as just about every host sets up their cron a bit different.

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
2 months 2 weeks ago #26710 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
I t hink I have the cronjob configured correctly (I hope):
0 */1 * * * /usr/bin/php /var/www/html/modules/mod_sv_reminders_sms/reminders_cron_sms.php

Is there a log of sms reminders within APPTpro?

There is log of cronjobs but they will not show if the system functioned correctly.

AND,,,, thanks so much for your patience!! I can run the sms reminder manually from the front desk calendar and it shows
each text as success or not. If you can share where this logs, it would be great

Please Log in to join the conversation.

More
2 months 2 weeks ago - 2 months 2 weeks ago #26711 by Rob
Replied by Rob on topic SMS Reminders config
They should log to the Reminder Log page, the same as the interactive ones sent from the Appointments page do.
Last edit: 2 months 2 weeks ago by Rob.

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
2 months 2 weeks ago #26712 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
Found it! Thanks so much

Please Log in to join the conversation.

More
2 months 2 weeks ago #26713 by Rob
Replied by Rob on topic SMS Reminders config
You're welcome. ;-)

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
1 month 3 weeks ago - 1 month 3 weeks ago #26721 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
Grrrr,, the creation of cron for these is driving me batty.

When I run either the SMS or email reminders from the reception Desk ( manually) all works as planned.

From Cron,,, nope.

This is what I get when I run the script from commandline:

root@testsvr:/home/steveklund# /usr/bin/php /var/www/html/modules/mod_sv_reminders_sms/reminders_cron_sms.php
PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/libraries/src/Form/FormHelper.php on line 106

root@testsvr:/home/steveklund# /usr/bin/php /var/www/html/modules/mod_sv_reminders/reminders_cron.php
PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/libraries/vendor/typo3/phar-stream-wrapper/src/PharStreamWrapper.php on line 457
root@testsvr:/home/steveklund#


I discovered this after reading on why cronjobs fail, and the suggestion that if it does not run form commandline it will not run from cron.

My php.ini memory_limit is set to 512M.

I'm stumped. Any suggestions?
Last edit: 1 month 3 weeks ago by Steve Klund. Reason: forgot some code

Please Log in to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #26722 by Rob
Replied by Rob on topic SMS Reminders config
Verify using a browser, not command line, first.
See Testing section at the bottom of the setup page..
appointmentbookingpro.com/reminder-cron-module-email
appointmentbookingpro.com/reminder-cron-module-sms

Verify with your hosting support, that you are running cron job as they require.
There are many different ways a host can setup cron and yours may require specific syntax.
Last edit: 1 month 3 weeks ago by Rob.

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
1 month 3 weeks ago #26723 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
I am now getting these entries in the Reminder Log. I had not had these appear prior to me changing the cronjob.

Can I should a hesitant "YIPPEE"? The sms_reminder module is configured to send for appt's 48 hours out.


1930 -1 -1 No bookings found for 48 hours out. 2021-06-02 15:00:01

Please Log in to join the conversation.

More
1 month 3 weeks ago #26724 by Rob
Replied by Rob on topic SMS Reminders config
Looks promising.

Please Log in to join the conversation.

  • Steve Klund
  • Steve Klund's Avatar Topic Author
  • Offline
  • Gold Boarder
  • Gold Boarder
  • Technology is our friend
More
1 month 2 weeks ago #26726 by Steve Klund
Replied by Steve Klund on topic SMS Reminders config
Hopefully this is the final entry of confusions..........

I found the cronjob would not work as my standard user. I changed to root's crontab. Now the sms_reminders work fine on one machine.

When I duplicate to my second server, it fails. I'm sure it's some permissions thing an am not seeing how to resolve. So my question is regarding the ownership of the cronjob...... should I create a user, make it a member of www:data group and use for these cronjobs? or does it matter?
On your configuration, do you run the raw command in cron :
0 8-17 * * * /usr/bin/php /var/www/html/modules/mod_sv_reminders_sms/reminders_cron_sms.php

or do you recommend putting this within a shell script?

Could you post an example of how you have on your system?

Please Log in to join the conversation.

More
1 month 2 weeks ago #26727 by Rob
Replied by Rob on topic SMS Reminders config
cron operation differs from host to host.

I suggest you ask your hosting support how they suggest you run it.
It is just a php file.
The cron job runs the php interpreter passing it the name of the php file to run.

Some hosts have cron setup to run a url rather than a physical file path.

Please Log in to join the conversation.

Time to create page: 0.437 seconds
Powered by Kunena Forum

ABPro + Plotalot

ABPro data visualization with Plotalot     Read more...

Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013


Just thought I'd pass along some positive feedback from my client:
"All of us are excited about our new online booking!! Shanyn & Chelsea said it’s “fun”; even I’m getting the hang of it!  There are still a few glitches so we’re having another meeting on Tuesday - but all of us are thrilled!  Thank you! Thank you!"

The "glitches" they mentioned are all minor and I've tweaked a few settings and answered a few questions to address them. Overall they're very happy. "
Chris C


"Hi, im back 
 After using appbooking pro for 3 years successfully i have tried another booking system for a new site that was more expensive, promised a lot but full of errors and the developers wanted to suck the $$ for every little request.

Anyways, great to be back here "
roll82


"thanks for all the help you have given me over the past few months. We have managed to get the system to work so that multiple businesses around the country can log into our website and manage appointments for their own businesses through the ABPro System."

owen_molloy October 2013