Setup cronjob to trigger emails automatically

This guide explains setting up cronjob to trigger emails automatically without need for any page loads. Most of corejoomla extensions adds emails to the queue in CjLib component and needs a trigger to send the emails at regular intervals. There are two ways to trigger emails:

Contents

Types of scheduled jobs

Manual triggering: In this method the email job will be triggered when a front-end user access any page of the component. The component understand the last triggered time and will invoke the job only after the designated amount of time passed. This is little uncomfortable as it needs consistent traffic to your website pages.

Automatic cronjob: In this method no manual intervention needed. You need to have access to setup a cronjob on your system. Please consult your webhost to know more about your permissions on your system.

This guide will help you setup the automatic cron task using the linux cronjob. Windows servers have the feature of scheduled jobs which you can use to do the same thing.

Setup cronjob to execute CjLib email queue

Since the linux cronjob understands linux commands only you need some third party linux command to invoke a url. cUrl is one such utility which you can use to load any url. So here is the way to invoke your scheduled cronjob every 10 minutes:

Using WebCron to trigger the emails automatically

Most of the webhosts provide access to cron, however if you are using shared hosting or you are not comfortable with setting up crons, webcrons are the easiest method to this.
EasyCron is one of the WebCron service which can do this task in case you do not have access to cronjobs of your server. A simple quick start guide is available at the following location: