1

Hell, Friends. I am using WordPress Bookly Plugin. I want to send emails to customers daily using cron. Plugin is aksing this words to me "To send scheduled notifications please execute the following script hourly with your cron: php -f C:\wamp\www\multan-academy\wp-content\plugins\bookly-responsive-appointment-booking-tool\lib\utils\send_notifications_cron.php". Here, is the code for that file. What should I include or call here.

<?php
define('SHORTINIT', true);


/**
 * Class Notifications
 */
class Notifications
{
    public function __construct()
    {

    }



}

$notifications = new Notifications();

closed as off-topic by Milo, TheDeadMedic, Nicolai, Mayeenul Islam, Mark Kaplun Dec 24 '15 at 6:35

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

1

You should set up a cron job on the server to do what the plugin authors are asking you to do: execute the php command they've given you. Just make sure you're not setting up WordPress's wp_cron(), since this one is not a real cron job. From this article:

When it comes to WordPress, you can schedule an event to happen at a certain interval, but it doesn’t operate like a classical cron job.

Instead, the event is set and scheduled and written to the database. The next time a user hits the site, the WordPress cron system will look to see if an event is scheduled and, if so, will then fire the event.

Notice the problem?

Someone has to visit the site before the event actually kicks off. So if you’ve scheduled something to happen hourly, but no one has visited your site in the last hour, then the event will never kick off.

  • Thank you for your answer. Author is asking for " please execute the following script hourly with your cron". Can you please guide me how do i execute this script. – Zubair Mushtaq Dec 18 '15 at 19:34
  • This is not WordPress-related. You can search and find countless tutorials on how to set up a cron job to run on your particular server. – montrealist Dec 18 '15 at 21:15

Not the answer you're looking for? Browse other questions tagged or ask your own question.