i try to set up the reminder and set up the cronjob for this.
i am getting several errors (down).
I called the hoster and he said that in this admin.ajay is no Shebang set (1 row that tells the server what compiler should be working with this file (php)
He said we should write a wrapper around it..
Its a linux server.
Can you help me with this so that on our linux server the email reminder will work?
Thanks and best greetings.
Arno
/wp-admin/admin-ajax.php: line 1: ?php: No such file or directory
/wp-admin/admin-ajax.php: line 2: /bin: Is a directory
/wp-admin/admin-ajax.php: line 3: www: command not found
It looks like your server requires some additional settings (which happens quite often).
Could you please reach out to your hosting provider and ask them to help you to set a cron for your WP site? Since most probably it's coming from their end.
When I said "it happens quite often", I referred to hosting provider settings: it is a common situation when a hosting provider has their own cron settings, so the configuration that we provided in our documentation doesn't work. And we can't do anything about it since cron is set on the server's end, it's not coming from Amelia.
However, I will forward your case to our Level 2 support for further investigation.
We will get back to you at the earliest possible time.
Unfortunately, we cannot provide support for cron events written on the server, as depending on the server and the hosting provider there could be different commands for running the cron correctly.
If it doesn't work - you need to contact your hosting provider again, or before that, 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 "Cron Schedules" tab. In it, add a 15 minute interval:
Then go back to "Cron Events" tab and click on "Add new":
Below it, select "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.
Hi dear TMS-Team,
i try to set up the reminder and set up the cronjob for this.
i am getting several errors (down).
I called the hoster and he said that in this admin.ajay is no Shebang set (1 row that tells the server what compiler should be working with this file (php)
He said we should write a wrapper around it..
Its a linux server.
Can you help me with this so that on our linux server the email reminder will work?
Thanks and best greetings.
Arno
Hi, Arno,
Thank you for choosing Amelia.
It looks like your server requires some additional settings (which happens quite often).
Could you please reach out to your hosting provider and ask them to help you to set a cron for your WP site? Since most probably it's coming from their end.
Looking forward to hearing from you.
Hi Liza,
the information i send you were already the information I got from the hosting provider. They told me to to creat a a file with a wrapper around it...
i mean when this happens quiet often could you provide such file within the plugin or send me one that i can use?
Thanks a lot and best greetings, Arno
Arno,
When I said "it happens quite often", I referred to hosting provider settings: it is a common situation when a hosting provider has their own cron settings, so the configuration that we provided in our documentation doesn't work. And we can't do anything about it since cron is set on the server's end, it's not coming from Amelia.
However, I will forward your case to our Level 2 support for further investigation.
We will get back to you at the earliest possible time.
Best Regards.
Hello Arno
Unfortunately, we cannot provide support for cron events written on the server, as depending on the server and the hosting provider there could be different commands for running the cron correctly.
If it doesn't work - you need to contact your hosting provider again, or before that, 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 "Cron Schedules" tab. In it, add a 15 minute interval:
Then go back to "Cron Events" tab and click on "Add new":
Below it, select "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,
Aleksandar Vuković
[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