Okay
  Public Ticket #3416207
Cron schedule
Closed

Comments

  •  1
    Sofia started the conversation

    Hi there, 

    I'm not a developer and I'd like to have follow up notifications going with Amelia on my Wordpress website.

    I've set everything up but I don't know how to setup a cron job.

    I've read your FAQ and additional link but under tools in Wordpress I can't see Cron schedule or jobs.

    Can you please help?

    Thanks, Sofia

  •  1,619
    Marko replied


    Hello Sofia,

    Thank you for reaching out to us.

    If you do not know how ti set up cron you need to contact your hosting provider so that they can set up cron for since this is done there on their server not in Amelia.

    Cron is not Amelia's feature cron is a WordPress feature. 

    You can use cron with Amelia, but setting cron is not part of Amelia's support because it is not our feature. 

    If your cron is not working and you cannot set it up, you need to contact your hosting provider so that they can set up cron for you.

    We will try to help you as best we can in the meantime 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:

    7810032183.png

    Then, go to Tools/Cron Events, and click on the "Cron Schedules" tab. In it, add a 15-minute interval:

    2487877415.png

    Then go back to the "Cron Events" tab and click on "Add new":

    9085918175.png

    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");
    2095163400.png

    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:

    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 in case it doesn't please contact your hosting provider.

    If you have any more questions please open another ticket and we will gladly help you there.

    We wish you all the best.

    Have a nice day. 


    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  • Ulrich replied

    Hello there. 

    I add myself to this ticket, I don't have the function PHP option ?

    1322259379.png
  •  1,619
    Marko replied


    Hello Ulrich,

    Please in the future do not do that since we do not want to disturbe our other user since they will get each reply that is sent. So please open your own ticket if you have any issues with Amelia.

    However, this is not an issue with Amelia. As yo can see bellow cron is not Amelia's feature cron is a WordPress feature. 

    You can use cron with Amelia, but setting cron is not part of Amelia's support because it is not our feature. 

    Or if you are using WP Crontrol or similar you need to contact their support team since this is missing there not in Amelia.

    But, we can confirm that the process is still the same for WP Crontrol,

    It seems that you simply don't see the "PHP Event" radio option while making a new Cron Event in WP Crontrol.

    Here is how it should look, a screenshot from our testing environment when adding a new Cron job:

    6585683207.png

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

    Crons are scheduled tasks of the server, and this is a 3rd party plugin, so it is not an issue coming from Amelia.

    Please make sure you have the latest WP Crontrol version installed and go through the steps explained in their FAQ section, which is mentioned above.

    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)

    This should help but in case you still have some issues you need to contact their support team for the issue with their product. 

    If you have any more questions please open a new your own separate ticket for each question and we will gladly help you there.

    We wish you all the best.

    Have a nice day. 

    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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

  •  1
    Sofia replied

    Hi Marko,

    I contacted Wordpress and to add the cron event I had to first upload the WP Control app (given my website is hosted by Wordpress themselves), and then follow the instructions you provided.

    This might be useful info for other Wordpress hosted users. 

    May I also suggest that a link to the help note is added below the notification setup area itself? It might save you a few tickets.

    Thanks and have a great day. 

  •  1,619
    Marko replied

    Hello Sofia,

    We are glad to hear that everything is fine now and this is a good suggestion and I will forward it to the appropriate sector. Thank you for your suggestion and for letting us know.

    Should you have any further inquiries, we kindly request that you open separate tickets for each question and we will gladly help you there.

    We wish you all the best.

    Have a nice day. 


    Kind Regards, 

    Marko Davidovic [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps, floor plans, choropleth maps, and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    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