Set up queue and scheduler

Set up queue and scheduler

* Adding delivery settings will not send the mail.

* To process campaigns we use scheduler and to send mail and process notification we use a queue.

You need to add one Cron Job for the scheduler and two Cron Jobs for the queue.

Run campaign scheduler

Search for the Cron Job in your cPanel.

Click and go into the setup page for your Cron job.

Select “Once per minute” from Common Settings.

Run this command in to the “Command:” field /path/to/php /path-to-your-project/src/artisan schedule:run >> /dev/null 2>&1

Example: /path/to/php /path-to-your-project/src/artisan schedule:run >> /dev/null 2>&1

After completed all the cron jobs, you will view three cron jobs in your cPanel/server.

Run Cron Job for Queue

Again select “Once per minute” from Common Settings.

Select “Once per minute” from Common Settings.

Run this command in to the “Command:” field /path/to/php /path-to-your-project/src/artisan queue:work --sansdaemon --tries=3 --queue=high

Example: /usr/local/bin/php /home/mailerrelease/public_html/Mailer-1.0.2/upload/src/artisan queue:work --sansdaemon --tries=3 --queue=high

Again select “Once per minute” from Common Settings.

Select “Once per fifteen minutes” from “Minute” dropdown.

Run this command in to the “Command:” field /path/to/php /path-to-your-project/src/artisan queue:work --sansdaemon --tries=3 --queue=default

Example: /usr/local/bin/php /home/mailerrelease/public_html/Mailer-1.0.2/upload/src/artisan queue:work --sansdaemon --tries=3 --queue=default

If you are using shared hosting from the hosting service provider and have a Cpanel/Control panel. Service Provider: Bluehost, DreamHost, Namecheap, HostGator

NOTE: Sometimes PHP path may specify to your different web host. If your cron command isn't run, please contact your Hosting Provider about the exact PHP path.

Cpanel: (Bluehost, DreamHost, Namecheap, HostGator - Service provider)

Add Cron Job to run scheduler:

  • Search for the Cron Job in your cPanel.
  • Click and go into the setup page for your Cron job.
  • Select “Once per minute” from Common Settings.
  • Run these commands in to the “Command:” field

If you find any problem in running jobs please check your php.ini/php extension configuration.
Make sure there are no function that are called by the queue driver, such as, proc_open, pcntl_alarm, pcntl_async_signals,exec,shell_exec, pcntl_signal in the disable_functions.
If there any you’ll need to remove/enable those functions. Or you can contact with your hosting service provider.

We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies

More