Okay
  Public Ticket #2716065
Alerts
Closed

Comments

  •  2
    Jeromy Hoffee started the conversation

    I thought I set everything up correctly but for some reason our teachers and students neither one are receiving text reminders the day before their lesson. Can you help me figure out what I did wrong in order to fix this? It's just nice to get a reminder the day before.

  • [deleted] replied

    Hi, Jeromy!

    Thank you for your inquiry.

    Could you please tell if you set the cron job? If so, did it work before, or did you test it?

    Looking forward to hearing from you. 

  •  2
    Jeromy Hoffee replied

    What is the "cron job" ?

  • [deleted] replied

    Jeromy,

    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

    But I would recommend to use WP Crontrol plugin - it is the best option if you're not familiar with cron jobx. 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, in Crontrol go to "Cron Schedules", and scroll all the way down. Add a 15 minute interval:

    7697288025.png

    Then go to "Add PHP Cron Event" and add the URL you've copied like this:

    8523604308.png

    So:

    file_get_contents("yourURL");

    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, 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.

    Best Regards. 

  •  2
    Jeromy Hoffee replied

    I have tried to read through everything you sent about this and I am not having any luck. I evidently don't understand "cron". I don't use Linux at all....I use a macbook and our website is a wordpress site. Surely there is an easier way to go about this where the notifications will work and let teachers & customers know about their lessons coming up.

  • [deleted] replied

    Hi, Jeromy!

    Linux is the operating system of your server/hosting provider. 

    Sorry for that, I will try to cut off unnecessary details and leave only essential information.

    Please install the WP Crontrol plugin on your WordPress and follow the steps below:

    Copy only the URL from below a scheduled notification on Amelia -> Notifications page (don't copy this */15*** part, only the part that marked on the screenshot which is starting with http):

    7810032183.png

    Open the Crontrol plugin on the WP Plugins page, that what you will see:

    2816971293.png

    Click on "Cron Schedules", enter the following details, and click on "Add Cron Schedule":

    7697288025.png

    Then go to "Cron Event" and add the URL you've copied from Amelia -> Notifications page to this:

    file_get_contents("your copied URL"); 

    Please don't miss any symbols, especially the ; in the end. So it will look like this:

    8523604308.png

    Below it, add the name and set Next Run to your current time + 30 muns (for example, at 12.50):

    7642938415.png

    Click on "Add Event".

    After that, you can open Amelia, book a test appointment for the next day, set the Next Day Reminder notification to the same time as you set Next Run to (or a bit later, in my example, it's 13:00), and see if you receive a Reminder notification in about 30 mins:

    7071680391.png


    Hope that will help.

    Best Regards.