Apologies for the delayed answer. Please note that we don't work on weekends. Here is the basic explanation regarding cron job and how to configure it / test it.
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.
Well, it's not recommended since it's enough to configure just one. It will send all the scheduled notifications that you have configured. I forgot to add the instructions for cron testing. Please, refer to this video for more information.
is there anyway to know if working besides obviously just waiting to see if a text or email actually goes out? like will it (the wpcron tool) say something in the cron plugin to lmk things were or were not entered correctly, or if cron is working or not?
Unfortunatelly no, since this depends on the cronjob. It automatically checks if there are booked appointments already and then it sends the notifications. I guess you would need to stop the cronjob or configure the exact time when the cron job will be "pushed".
ok so if I set cron to run twice a day or something instead of it being set to run every 15 min - it would still send all the messages, it would just que them and send them at the set time?
I'm not sure if you can configure the same cronjob to run twice, since when you need to configure it with the PHP option, there is an option to configure just one run time. And there is no need to configure multiple cronjobs since one should send all the scheduled messages. The 15 minutes is just an example, but this can be configured according to your needs, of course.
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.
ok I have it set for once a day now. So it will send all messages that need to be sent. Basically notifications are just queued until the cron job runs?
Well, we can call them like that, but it all depends on the cron configuration. The reminder notification only works if the cron job is configured properly.
There is no stack, but the cron job runs and checks if the messages are already sent, and if they aren't, the cron jobs send them (if the time period configured is valid). For example, if the messages are sent, and you delete these messages from the log table in database, the cron job will run again and it will send them again.
what do you mean is (if the time period configured is valid)? Right now i have the cron set to check once a day, but it seems all messages may not being sent. Does it need to check twice a day. Is there a time limit on the notifications or something?
I mean, it depends on the time configured for the cron job. Remember that you have this option to configure
Depending on the recurrence configured here, the Cron job will run and send all the notifications. Usually, there is no need to configure this to run daily (twice), but you can configure it according to your needs. In most cases, "every 15 minutes" runs just fine.
Now, for the logs, this is stored in "wp_amelia_notifications_log"
I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
I was looking for a workaround for setting the time, but you can try this one. There is a time configuration option in notification settings, when you select a scheduled notifications template in the upper right corner, there is this option "scheduled for"
This is only available for pre-made scheduled notification templates. For example, when you select "appointment next day reminder" or "appointment follow up"
issue is I have a lot of custom email notifications set. Are you saying if you set the template notifications times the custom ones match that setting?
If not, let me know what determines the time custom notifications are set.
Each template will have its own time configured (it wont affect the others), but instead you can configure the time for custom notifications by configuring the schedule. If you select "scheduled notification" for the notification type, you will also find the option to configure the schedule. So it can be sent on the same day, before or after
Cron is a scheduled task which runs in a predefined sequence. If it's set to "15 minutes" it will run every 15 minutes from the moment it's created. In one day (24 hours), the cron would run 96 times. That doesn't mean that the notifications will be sent every time it runs. It checks whether there are scheduled emails/sms or not. If there are none - it will not send anything.
This brings us to the second point - default scheduled notifications in Amelia can be configured to run at a certain time during the day, or at a certain time after the appointment ends.
Example 1 - the "Next Day Reminder" is set to run every day at 17:00 so regardless of how many times the cron runs before 17:00, it will not trigger any notifications. Once 17:00 passes, and once the cron runs again after that time, it will see there is a certain number of scheduled notifications, and it will trigger them.
Example 2 - The same goes for the "Follow Up" notifications - if it's scheduled to be sent 30 minutes after the appointment ends, cron will not run until 30 minutes from the end time of the appointment passes. So, if a 30-minute appointment starts at 12:00, the "follow up" will be added to the queue at 12:30, so the next time the cron runs after that time is when the scheduled notification will be sent.
Example 3 - When it comes to custom notifications - just like in your screenshots - you can choose "Before", "After", or "On the same day" for each custom notification. If you set a custom notification to be sent 2 hours before the appointment, and there's an appointment at 14:00, the notification will be added to the queue at 12:00. The next time cron runs after 12:00 is when it will be sent.
So, given these three examples, there's no way a scheduled notification can be sent in the middle of the night, regardless of how many times the cron runs during the day. However, if you configure the cron to run once or twice a day, there's a good chance that a lot of scheduled notifications will not be sent.
Taking a look at the 3rd example, if the cron runs once a day, at 11:00, it will not run again until tomorrow. So, you created a custom notification that's supposed to be sent 2 hours before the appointment but since there's no cron running between 11:00 TODAY and 11:00 TOMORROW, nothing will be sent.
To summarize: The more often the cron runs, the closer you will be to the timeframes configured in scheduled notification (be that 1, or 2 hours before the appointment, or at 15:00 every day). It does not trigger any notifications if there aren't any notifications in the queue (programmatically added by Amelia). The time is defined by either the time of the day or by the appointment times. The time of the day should be clear, while the appointment times depend on the actual appointment. If you create a Custom Notification that's sent 1 hour before the appointment, it will be sent 1 hour before the appointment starts. If you create a notification that's sent 1 hour after the appointment, it will be sent 1 hour after the appointment ends.
so what info goes where, like what are the cron settings?
also seems my website only sends sms and email notifications for appointment confimations, and changes, like triggered events.
however, not sending all custom set notifications for email or sms. i have a bunch set but only the basic ones send. any ideas?
using wordpress, wp mail smtp, email server is sendlayer
Attached files: cron.png
can anyone respond also if I’m using plugins that change plugin names for security purposes, would that change the crons i need to enter?
Hello Adam,
Apologies for the delayed answer. Please note that we don't work on weekends. Here is the basic explanation regarding cron job and how to configure it / test it.
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
can I add all the suggested formats you suggested for the cron, or will that cause a conflict or duplicate or repeatedly.
For reference btw on website specifics:
Current version of Wordpress
A2 hosting
Mail server is sendlayer
Hi Adam,
Well, it's not recommended since it's enough to configure just one. It will send all the scheduled notifications that you have configured. I forgot to add the instructions for cron testing. Please, refer to this video for more information.
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
okay, do a cron for each notification that has the add cron tag under it. Or does one cron cover all custom notifications?
do i need this?
???
do i need the */15 * * * *, or just the https link part?
Hello Adam,
You would need to configure it like this
This "URL" part you can find in Notifications template, under "Appointment reminder" or any other scheduled notification.
In 99 percent it works with this configuration, but since it depends on the server configuration, you want to test it out and see if it works.
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
is there anyway to know if working besides obviously just waiting to see if a text or email actually goes out? like will it (the wpcron tool) say something in the cron plugin to lmk things were or were not entered correctly, or if cron is working or not?
Hello Adam,
Please, refer to this video for more information. There are some steps to check if 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
anyway to stop the alerts from going out throughout all hours of the middle of the night?
Hi Adam,
Unfortunatelly no, since this depends on the cronjob. It automatically checks if there are booked appointments already and then it sends the notifications. I guess you would need to stop the cronjob or configure the exact time when the cron job will be "pushed".
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
ok so if I set cron to run twice a day or something instead of it being set to run every 15 min - it would still send all the messages, it would just que them and send them at the set time?
Hi Adam,
I'm not sure if you can configure the same cronjob to run twice, since when you need to configure it with the PHP option, there is an option to configure just one run time. And there is no need to configure multiple cronjobs since one should send all the scheduled messages. The 15 minutes is just an example, but this can be configured according to your needs, of course.
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
ok I have it set for once a day now. So it will send all messages that need to be sent. Basically notifications are just queued until the cron job runs?
Hi Adam,
Well, we can call them like that, but it all depends on the cron configuration. The reminder notification only works if the cron job is configured 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
yes the cron job is set up correctly. Not really asking about the crons, I understand that.
What I’m asking is if any notifications would be missed scheduling them online to be checked once a day.
Just asking if the notifications that need to be sent just stack up until the cron is run.
I know about crons, asking about the Amelia side of things.
Hi Adam,
There is no stack, but the cron job runs and checks if the messages are already sent, and if they aren't, the cron jobs send them (if the time period configured is valid). For example, if the messages are sent, and you delete these messages from the log table in database, the cron job will run again and it will send them again.
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
what do you mean is (if the time period configured is valid)? Right now i have the cron set to check once a day, but it seems all messages may not being sent. Does it need to check twice a day. Is there a time limit on the notifications or something?
where can i view log table in database?
I mean, it depends on the time configured for the cron job. Remember that you have this option to configure
Depending on the recurrence configured here, the Cron job will run and send all the notifications. Usually, there is no need to configure this to run daily (twice), but you can configure it according to your needs. In most cases, "every 15 minutes" runs just fine.
Now, for the logs, this is stored in "wp_amelia_notifications_log"
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
well issue is when it runs every 15 minutes my customers are gettings texts at like 1am, 2am, 4am, ect. a bit of a disturbance thats annoying them.
Hi Adam,
Well, in that case, i guess configuring it to run once daily or something similar would be most appropriate.
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
what determines when notifications requiring cron sends?
For instance I have notifications set for example like 5 days after service, 100 days, 4 months, ect
however they send at random times throughout day.
What actually determines when they send.
Like when I have cron to run every 15 min, the same notification type sends all throughout day
there’s no time settings in notifications settings, just can set by days, week, months
So what determines the time?
hello?
Hi Adam,
I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
I was looking for a workaround for setting the time, but you can try this one. There is a time configuration option in notification settings, when you select a scheduled notifications template in the upper right corner, there is this option "scheduled for"
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
I don't see that option, please send screenshot examples.
dont see option on both email or sms
Hi Adam,
This is only available for pre-made scheduled notification templates. For example, when you select "appointment next day reminder" or "appointment follow up"
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
issue is I have a lot of custom email notifications set. Are you saying if you set the template notifications times the custom ones match that setting?
If not, let me know what determines the time custom notifications are set.
Hi Adam,
Each template will have its own time configured (it wont affect the others), but instead you can configure the time for custom notifications by configuring the schedule. If you select "scheduled notification" for the notification type, you will also find the option to configure the schedule. So it can be sent on the same day, before or after
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
yes obviously given our whole conversation so far I clearly understand that.
You know what I’m asking…….
What determines the time custom notifications are sent.
not the days, hours, months. What determines the time….
Hi Adam,
Cron is a scheduled task which runs in a predefined sequence. If it's set to "15 minutes" it will run every 15 minutes from the moment it's created. In one day (24 hours), the cron would run 96 times. That doesn't mean that the notifications will be sent every time it runs. It checks whether there are scheduled emails/sms or not. If there are none - it will not send anything.
This brings us to the second point - default scheduled notifications in Amelia can be configured to run at a certain time during the day, or at a certain time after the appointment ends.
Example 1 - the "Next Day Reminder" is set to run every day at 17:00 so regardless of how many times the cron runs before 17:00, it will not trigger any notifications. Once 17:00 passes, and once the cron runs again after that time, it will see there is a certain number of scheduled notifications, and it will trigger them.
Example 2 - The same goes for the "Follow Up" notifications - if it's scheduled to be sent 30 minutes after the appointment ends, cron will not run until 30 minutes from the end time of the appointment passes. So, if a 30-minute appointment starts at 12:00, the "follow up" will be added to the queue at 12:30, so the next time the cron runs after that time is when the scheduled notification will be sent.
Example 3 - When it comes to custom notifications - just like in your screenshots - you can choose "Before", "After", or "On the same day" for each custom notification. If you set a custom notification to be sent 2 hours before the appointment, and there's an appointment at 14:00, the notification will be added to the queue at 12:00. The next time cron runs after 12:00 is when it will be sent.
So, given these three examples, there's no way a scheduled notification can be sent in the middle of the night, regardless of how many times the cron runs during the day. However, if you configure the cron to run once or twice a day, there's a good chance that a lot of scheduled notifications will not be sent.
Taking a look at the 3rd example, if the cron runs once a day, at 11:00, it will not run again until tomorrow. So, you created a custom notification that's supposed to be sent 2 hours before the appointment but since there's no cron running between 11:00 TODAY and 11:00 TOMORROW, nothing will be sent.
To summarize: The more often the cron runs, the closer you will be to the timeframes configured in scheduled notification (be that 1, or 2 hours before the appointment, or at 15:00 every day). It does not trigger any notifications if there aren't any notifications in the queue (programmatically added by Amelia). The time is defined by either the time of the day or by the appointment times. The time of the day should be clear, while the appointment times depend on the actual appointment. If you create a Custom Notification that's sent 1 hour before the appointment, it will be sent 1 hour before the appointment starts. If you create a notification that's sent 1 hour after the appointment, it will be sent 1 hour after the appointment ends.
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