My appointment reminder notifications for some strange reason have stopped working for the last couple of days. I can confirm this is true by looking at the email logs sent (via fluentSMTP).
All other emails are sending. I haven't changed anything in the cron either.
I confirmed with tech support at Cloudway that the cron is indeed still being fired:
It's possible that this issue began after I updated to latest version, but I can't confirm this 100% - the logs show me notifications were being sent last week, and stopped around the time I updated (I think)
Any ideas why these notifications may not be working and how I can fix this?
Thanks for reaching out to us. I'm noticing that you have cronjob configured on the CPanel. Usually, we recommend using WPCrontol for sending scheduled notifications. Now, we are not sure about the cron job configuration on CPanel, but looking at the response you got from the support, it does look like it's working properly. Since the cronjob is not an Amelia feature, it a Linux feature I doubt the the update can mess up the cron job (unless the configuration is not correct), so I'm not sure how else we should test it.
This screenshot tells me that the messages are sent successfully and this confirms that the cron job is working properly. (this is how we would test it anyway)
Well, I can recommend configuring the WPCrontol plugin instead of CPanel, since this has been used by a lot of our users and it's working properly for them. This is an extended explanation of how it works and how it should be configured.
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.
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:
Then, go to Tools/Cron Events, and click on the "Cron Schedules" tab. In it, add a 15-minute interval:
Then go back to the "Cron Events" tab and click on "Add new":
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");
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:
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.
Apologies for the delayed answer. These are the tests that we would also do. Inserting the cron line in the browser URL field will trigger the scheduled notifications, but yet again, it depends on the configuration of the cron job itself. You can monitor the issue further and let us know if you still have the issues with cron job or if you have any other questions, of course.
it nevertheless didn't send the notifications today.Not sure exactly what's going on. Shouldnt' the notifications get sent if I get that response? Maybe it's the time I put it in the URL that's the issue? Not sure why they're not sending when I'm manually execyting command the URL in a browser.
The cron job is not Amelia feature so it's not related to Amelia. There are two options, you can either provide the Cpanel access or you can configure the WPCrontol plugin and configure the cron as per our instructions. WPCrontrol has been used by a lot of our users and the cron job is working properly.
Please take a look at this official WP Crontrol Page, in the FAQ section, find this question "which users can manage PHP cron events".
They mention a possible reason why users can't see the "PHP Event" radio button (the user you're logged in to WordPress with most likely doesn't have the edit_files capability).
Also, there's a possibility that a security plugin disallows file editing, which as a result hid that "PHP cron event" option selection in WP Crontrol. In iThemes Security there's a "Disable File Editor" option in settings, and that needs to be turned off as well. If you're using a different security plugin, look for a similar option, or reach out to that plugin's support team.
The above message was incorrect; notifications were actually not being sent. This was the problem. I don't know why they are being sent now, but this was the actual issue. The cron was actually running fine, but the emails were not getting sent.
It appears to be working now. Perhaps modifying a notification, or changing scheduled time fixed it? I can't say for sure why it's working properly now
Does this help you understand the problem now?
I'll keep my on it, and come back here if the issue happens again
That message is actually showing a status when you run the cron job, it actually tells you if the cron job is working properly or not. It depends on the time configuration, that's correct.
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.
Hi,
My appointment reminder notifications for some strange reason have stopped working for the last couple of days. I can confirm this is true by looking at the email logs sent (via fluentSMTP).
All other emails are sending. I haven't changed anything in the cron either.
I confirmed with tech support at Cloudway that the cron is indeed still being fired:
*/15 * * * * wget -q -O - "https://rxxxxxxxz.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send"
It's possible that this issue began after I updated to latest version, but I can't confirm this 100% - the logs show me notifications were being sent last week, and stopped around the time I updated (I think)
Any ideas why these notifications may not be working and how I can fix this?
Thanks!
Hi ronnie,
Thanks for reaching out to us. I'm noticing that you have cronjob configured on the CPanel. Usually, we recommend using WPCrontol for sending scheduled notifications. Now, we are not sure about the cron job configuration on CPanel, but looking at the response you got from the support, it does look like it's working properly. Since the cronjob is not an Amelia feature, it a Linux feature I doubt the the update can mess up the cron job (unless the configuration is not correct), so I'm not sure how else we should test it.
This screenshot tells me that the messages are sent successfully and this confirms that the cron job is working properly. (this is how we would test it anyway)
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Stefan,
Thanks for your prompt reply.
I can confirm that clients both yesterday and tomorrow's clients did not get notification reminders.
So while the cron job is running successfully as you say, the emails are not getting sent.
I'm not sure what my next move should be, as both Cloudways and yourself are saying it's working fine...when it's not.
Perhaps you could point me in the right direction?
Thanks kindly,
Ronnie
Hi Ronnie,
Well, I can recommend configuring the WPCrontol plugin instead of CPanel, since this has been used by a lot of our users and it's working properly for them. This is an extended explanation of how it works and how it should be configured.
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:
Then, go to Tools/Cron Events, and click on the "Cron Schedules" tab. In it, add a 15-minute interval:
Then go back to the "Cron Events" tab and click on "Add new":
Below it, select the "PHP Cron event" radio button, and add the URL you copied from Amelia/Notifications in this form:
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:
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,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi ronnie,
Apologies for the delayed answer. These are the tests that we would also do. Inserting the cron line in the browser URL field will trigger the scheduled notifications, but yet again, it depends on the configuration of the cron job itself. You can monitor the issue further and let us know if you still have the issues with cron job or if you have any other questions, of course.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi,
Just a small update - the cron didn't fire again today. So, I tried manually putting it into the browser URL. While it said it was working
it nevertheless didn't send the notifications today.Not sure exactly what's going on. Shouldnt' the notifications get sent if I get that response? Maybe it's the time I put it in the URL that's the issue? Not sure why they're not sending when I'm manually execyting command the URL in a browser.
I'm concerned the issue may not be a cron issue, as even when I manually run this url https://ronnieadamowicz.com/wp-admin/admin-ajax.php?action=wpamelia_api&call=/notifications/scheduled/send it is not sending notifications as it should.
Hi Ronnie,
The cron job is not Amelia feature so it's not related to Amelia. There are two options, you can either provide the Cpanel access or you can configure the WPCrontol plugin and configure the cron as per our instructions. WPCrontrol has been used by a lot of our users and the cron job is working properly.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi ronnie,,
This cronjob is not configured with PHP option
If you go to Edit, there is no PHP button
Please take a look at this official WP Crontrol Page, in the FAQ section, find this question "which users can manage PHP cron events".
They mention a possible reason why users can't see the "PHP Event" radio button (the user you're logged in to WordPress with most likely doesn't have the edit_files capability).
Also, there's a possibility that a security plugin disallows file editing, which as a result hid that "PHP cron event" option selection in WP Crontrol. In iThemes Security there's a "Disable File Editor" option in settings, and that needs to be turned off as well. If you're using a different security plugin, look for a similar option, or reach out to that plugin's support team.
SiteGround Optimizer -> Frontend Optimization -> Javascript -> Defer Render-blocking JavaScript (uncheck)
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
Hi Stefan,
The cron somehow started working properly (i stopped using wp crontrol).
However, the issue was that despite the cron returning:
{"message":"Scheduled email notifications successfully sent","data":null}
The above message was incorrect; notifications were actually not being sent. This was the problem. I don't know why they are being sent now, but this was the actual issue. The cron was actually running fine, but the emails were not getting sent.
It appears to be working now. Perhaps modifying a notification, or changing scheduled time fixed it? I can't say for sure why it's working properly now
Does this help you understand the problem now?
I'll keep my on it, and come back here if the issue happens again
Ronnie
Hi Ronnie,
That message is actually showing a status when you run the cron job, it actually tells you if the cron job is working properly or not. It depends on the time configuration, that's correct.
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.
Kind Regards,
Stefan Petrov
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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