Okay
  Public Ticket #2751739
SMS notifications
Closed

Comments

  • Michael started the conversation

    Since setting up SMS notifications on Amelia we have our patient consistently receive a 'day before' SMS notification at 4am daylight saving or 3am  on the actual day of their appointment. This often makes it too late for practitioners to change their schedule if their appointment has been cancelled by the patient. Since we a situated in Australia, I assume it has something to do with our time zone. Can this time be changed to reflect Australian Eastern Standard  time zone so that the patient gets the reminder closer to 24 hours before their appointment?

  •  2,572
    Aleksandar replied

    Hello Michael

    Please go to WordPress' General settings, and verify that under "Time Zone" you've selected the city you're in. So, if the time zone is set to "UTC+/-" format - change it, and select the city you're in.

    Then check your cron, and see what its recurrence is set to. It should be once every 15 minutes or something like that.

    If the cron runs every 15 minutes it checks if there's an email to be sent. So, in Amelia Notifications, your scheduled notifications are set to run every day at a certain time. If you set that time to be 15:00 (for example), the emails will be sent when the cron runs after that time.

    For example, there's an appointment booked for tomorrow, and it's currently 14:44 - the cron runs, but since it's not yet 15:00, it doesn't send anything. It runs again after 15 minutes, so at 14:59, but there are still no emails flagged by Amelia, so it doesn't send anything. Then it runs again at 15:14 and it sees there's an email that should've been sent at 15:00, so it sends the email. It will only send emails when Amelia sees an appointment scheduled for the next day.

    It works the same for SMS.

    I hope that helps.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Michael replied

    I followed your direction about changing the time zone from UTC format to selecting the city and immediately lost almost all the appointments for practitioners in the calendar! The appointments are still there on the appointment page but practitioners are now having a hard time finding out when the patient appointments are because the booking times have all been changed. 

    Also even though you've given me an example of what happens in the cron regarding notifications,  I do not know in what part of the cron I need to change it so that it runs every 15 minutes. I've installed a plugin called WP Crontrol and there are many places I can change this setting. 

    Can you please check what has happened to our appointment bookings at https://hhcc.com.au 
    I can give you admin access if you need to access the back end.

    Regards,

    Michael

  •  2,572
    Aleksandar replied

    Hello Michael

    Unfortunately, this is expected behavior. Your existing appointments' times were saved in an incorrect time zone, so when you changed the time zone, they were adjusted to the new time zone.

    If the time zone was in UTC, at 12, and you change the time zone to Berlin, the appointment will move to 2 PM. You can only manually modify the appointments to accommodate the correct times, but all new appointments will be in the correct time zone.

    I'll provide a detailed explanation about the cron, and if that doesn't help, I'll need you to provide me wp-admin credentials (administrator) in a PRIVATE response, so I can check it out.

    cron is a Linux utility that schedules a command or script on your server to run automatically at a specified time and date. A cron job is the scheduled task itself. Cron jobs can be very useful to automate repetitive tasks like in our plugin for notifications.

    Depending on the server, there are different configurations for it, which you can contact your hosting provider about, or you can check out one of the solutions for it on this link.

    Also, you can try this:

    */15 * * * * wget -q -O - "https://www.yourwebsite.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send"

    Or this:

    */15 * * * * /usr/local/bin/php ~/public_html/wp-cron.php --action='wpamelia_api' --call='/notifications/scheduled/send'

    Or this:

    GET 'https://yourdomain.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send' > /dev/null

    WP Crontrol plugin is the best option if you're not familiar with cron jobs. You can find more info about it, and detailed instructions on how to set it up in our FAQ section.

    So, if you already read that, and still need some clarification here's some further info.

    You copy only the URL from below a scheduled notification:

    7810032183.png

    Then, go to Tools/Cron Events, and click on the "Cron Schedules" tab. In it, add a 15-minute interval:

    2487877415.png

    Then go back to the "Cron Events" tab and click on "Add new":

    9085918175.png

    Below it, select the "PHP Cron event" radio button, and add the URL you copied from Amelia/Notifications in this form:

    file_get_contents("yourURL");
    2095163400.png

    Below it, add the name and set it to run a few minutes in the future, using the provided time format. So, if you're adding the cron event at 12:45 (local, current time), set it to run at 12:50; and then select the schedule you previously selected:

    7642938415.png

    Click on Add Event, and that's it.

    The cron runs every 15 minutes and checks if there's an email to be sent. So, in Amelia Notifications, your scheduled notifications are set to run every day at a certain time. If you set that time to be 15:00 (for example), the emails will be sent when the cron runs after that time.

    For example, there's an appointment booked for tomorrow, and it's currently 14:44 - the cron runs, but since it's not yet 15:00, it doesn't send anything. It runs again after 15 minutes, so at 14:59, but there are still no emails flagged by Amelia, so it doesn't send anything. Then it runs again at 15:14 and it sees there's an email that should've been sent at 15:00, so it sends the email. It will only send emails when Amelia sees an appointment scheduled for the next day.

    I hope that helps.

    Kind Regards, 

    Aleksandar Vuković
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables