Setting Up the Cron Job

A Cronjob's actually just a task scheduler on most linux/unix environment. Most, if not all linux/unix hosting account comes with a cronjob service included. If your hosting provider does not provide a cronjob interface, it's best to start looking for another hosting agent.

Why do we need cronjobs?

Because of processing emails are always slow. When there are hundreds of emails to be processed at a time, the server needs to contact the respective mail servers to deliver the mail. However, the process for each delivery might differ from time to time and this would result in higher bounce rate of users to your site.
Also we need the script to be run on regular time basis and Cronjobs are just about it.

What if my host agent doesn't have cronjobs?

If your webhost doesn't support cronjobs, it's time that you ditch them or get them to allow cronjobs. It's one of the most important tools to build a site.


CPanel Cronjobs

This section will guide you through the process of setting up cronjobs for Unpaid Orders Component using cPanel. If your hosting provide do provide you with cPanel, this guide is definitely for you.

Accessing cPanel

To access the cronjobs section on your cPanel, you just need to click on the cronjob icon. Make a quick search for 'Cron' to find it quick.

Getting Notified

This step is very important and you should set this up so that you check if the cronjob is executing correctly. 

Creating the Cronjob

Once the notification have been setup, you will want to now create the cronjob. To setup cronjob, follow the steps below:
Cronjob Interval
Choose the interval for the cronjob to get executed.
Common Settings
This allows you to select a commonly used interval usually every 5 mintes.
The recommended frquency depends on the task that the script has to perform. In our case, with the UNPAID ORDERS REMINDER, it will depend on how many orders script will have to revive
If there hare many orders to revive , set a very short frequencey (5 minutes for instances) 

Important notice: Depending on your order age settings in the UNPAID ORDERS REMINDER component. If you follow the rcommended options , we recommend you don't set more than 1 day for the Cron Frequency.

Minute: This sets the cronjob to execute at every X minutes.
Hour: This sets the cronjob to execute at every X hour.
Day: This sets the cronjob to execute at every X day.
Month: This sets the cronjob to execute at everyX day.
Weekday: This sets the cronjob to execute at selected weekdays.

Command
This field allows you to set the command for cPanel to execute.

/bin/wget -O /dev/null "http://site.com/index.php?option=com_bdaygreets&s=xxxx"

Not all hosting providers support /bin/wget. It's best that you contact your hosting provider to find out the utility that can be used for cronjobs to access the website.

Note XXXX is your cron secret. It prevents anyone to trigger you cronjob.

Some example commands

PlanetHoster:
wget -O - -q 'https://www.yoursite.com/index.php?option=com_bdaygreets&view=cron&tmpl=component&s=XXXX' --user-agent="PlanetHoster/CRON"

Siteground:
/bin/wget -O /dev/null "http://www.yoursite.com/index.php?option=com_unpaidreminder&view=cron&tmpl=component&s=XXXX"

Easycron.com: You can also use a 3rd party service delivering free Cron Jobs with a userfriendly interface at
Easycron.com


Note: You can have cron to send an email for each time it runs a command. However, if you do not want an email to be sent for an individual cronjob, you can redirect the command's output to a wormhole by adding this command line.
/dev/null like this: mycommand >/dev/null 2>&1
If you need help from us with your Cron Job setting , ask in the support forum



BIRTHDAY GREETINGS

As soon as your Cron Job is set properly and it find users to greet for their birthday, these users  will be emailed, and an entry will be added for each in the #__bdaygreets_greets database table, and in the component backend list.
  • Created on .
  • Last updated on .
Disclaimer: Nordmograph is not affiliated with or endorsed by The Joomla! Project™. Any products and services provided through this site are not supported or warrantied by The Joomla! Project or Open Source Matters, Inc. Use of the Joomla!® name, symbol, logo and related trademarks is permitted under a limited license granted by Open Source Matters, Inc.
Copyright © 2020 Nordmograph - Joomla extensions. All Rights Reserved.
Joomla! is Free Software released under the GNU General Public License.
Browser of the future