Okay
  Public Ticket #2288654
Notifications not working
Closed

Comments

  • Dameon Runnels started the conversation

    I set up the cron job as instructed. It will send an email to the employee but that's it. No notifications to the email address that's booking the appointment. No reminder emails for either party and no emails after its all done. I attached a screen grab of the cron job on my server.

  • [deleted] replied

    Hello Dameon Runnels, 

    Could you please tell me have you contacted your hosting provider about the SMTP communication through your server, and for the cron jobs as well? Have you got the configuration that you setup in Amelia from them? 

  • Dameon Runnels replied

    Hi Miraja,

    Thanks for the response. Yes, I got the SMTP information from them. First I set up an email account through my hosting. Then the credentials for that email account was used for the Amelia set up. This is how Siteground works. As I said before, the employee gets a notification but all the other notifications never happen. I've set appointments for 2 days out 4 days out and a week out. The customer never got their's initial email and none of the follow up notification ever happened.

    Attached is a look at my chronjob. The bottom is the one that I have already set up. Above that is a look at the dropdown selections I used when I created my cronjob.

    You'll notice that it had a warning: Please do not set your cron jobs to run in less than 30 minutes. We recommend this time frame in order to ensure the optimal execution of the configured scripts

    I tried the minute mark at 30 and even an hour. Still nothing

  • [deleted] replied

    Hello Dameon Runnels, 

    You are welcome. 

    If the notifications work they will work for all users the same, for all notifications that are checked in the Notifications list in Amelia. So, the reason why someone didn't get it might be because their mail service provider is blocking them or they end up in Spam or similar, unfortunately. This is for all notifications without a clock icon in Amelia -> Notifications and the ones with the clock requires the cron jobs. 

    Regarding the cron jobs, they do require a bit of additional configuration, could you please tell me have you also asked your hosting provider about this setup (for the cron job)? The configuration can be different on different servers, and we don't use the WordPress cron file for the cron jobs but our own. You can check this instruction, maybe it can help (there is one link with some solutions and there is also an instruction on using a plugin for this purpose): 

    You can see the more detailed tutorial of how to set up cron at this link.

    If you are not familiar with this you can use plugin WP Crontrol for creating a cronjob.

    In the Tools -> Cron Events admin panel, click on the “Add PHP Cron Event” tab underneath the cron event table.

    1..png1.-1024x447.png

    In the form that appears, enter the schedule and next run time in the boxes. The event schedule is how often your event will be executed. In the “PHP code” area, enter the PHP code that should be run when your cron event is executed. Please insert this:

    file_get_contents("https://yourwebsite.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send");

    You don’t need to provide the PHP opening tag (<?php).

    2..png2.-1024x454.png

    Please replace “https://yourwebsite.com” with your real web address.

    If you don’t see a good interval, then add one in the Settings -> Cron Schedules admin panel or click on the link “Manage Cron Schedules”. You will find an example of how you can make custom interval inserting:

    • Interval name
    • Interval(in seconds)
    • Display name
    3..png3.-1024x346.png

    and click “Add Cron Schedules” and it will be added.

    4..png4.-1024x123.png

    When you made custom interval you need to go back to  Tools -> Cron Events admin panel and click on the “Add PHP Cron Event” tab underneath the cron event table where you will insert that custom interval and all other fields that are described above. After clicking on “Add PHP Cron Event” it will be added on Event table and you are done.

    5..png