Okay
  Public Ticket #2563954
Cron job not working
Closed

Comments

  • Raul started the conversation

    Hi,

    Im in process of testing the booking and adding the cron job for notifications and i found that the cron it's not working automatically.

    I found a guide inside this forum and i made the process using a plugin called WP Crontrol. but the cron it's still not working.

  • [deleted] replied

    Hello Raul,

    Thanks for your message.

    Are you able to share more details about the issue. Did you raise it with your hosting provider (if applicable)?

  • Raul replied

    Well, i found out that the client needs to be related to a wordpress user to send the cron notification if the user it's just an amelia customer and it's not in the wordpress client list the notifications are not sent at all.

  • [deleted] replied

    Hi Raul,

    Thank you for the update.

  • Raul replied

    this type of cron config using wpcrontrol should be put inside the documentation 

  • Raul replied

    The other important thing is the hour of the notification. It's related to the UTC or the country timezone?

  • [deleted] replied

    Hi Raul,

    I believe we do have some documentation in place:

    https://wpamelia.com/notifications/

    https://www.taniarascia.com/setting-up-a-basic-cron-job-in-linux/

    I will clarify your second question and get back to you later this week.

  • Raul replied

    Den,

    I tried with that same documentation and doesn't worked for me. i don't know the reason. Then i used the WPcontrol tutorial that i found inside one of other peoples ticket that worked.

  • [deleted] replied

    Hi Raul,

    The time when the notification will be sent depends on the WordPress' time zone.

    Just wanted to reconfirm the following:

    Well, i found out that the client needs to be related to a wordpress user to send the cron notification if the user it's just an amelia customer and it's not in the wordpress client list the notifications are not sent at all.

    Can you please clarify this message.

  • Raul replied

    Hi,

    If you select the option to just add the registered users in amelia clients list and not in the wordpress as amelia customer they will not get the cron related notifications.

  • [deleted] replied

    Hi Raul,

    cron is a Linux utility which 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.

    Emails are pulled from wp_amelia_users table, and all customers are stored in that database table, regardless if they are connected to the WordPress user or not. The only difference between a connected customer and a non-connected customer is the "ExternalId" column, which simply assigns the foreign key of a database user.

    Cron doesn't know that, and it's of no relevance to the task. It checks Amelia's schedule, and sees if there is a scheduled notification to be sent for tomorrow. If there is an appointment, it pulls the user's email address from the database, and triggers the email, so the email is sent.

  • Raul replied

    i will try to explain myself...

    if you select the option for the new users in your site to be a "subscriber" instead of "amelia customer" the cron isn't working. I don't know if that's a bug or something. im just telling you because i found that weird.

  •   [deleted] replied privately