This article provides a step-by-step tutorial on how you can setup your cron task on your own server.
Only use this setup if you have the expertise of setting cron task on the server or you can hire an experienced person to setup for you.
You need to contact your hosting provider for the correct script to trigger the jNews Cron URL.
Some hosting providers can not launch the url of the jNews cron task. In that case, we recommend you to use our free service on our website or the cron plugin.
Once you have the correct script, you need to call below URL;
curl "http://www.yoursite.com/index2.php?option=com_jnews&act=cron"
The cron task will trigger your site every X minutes to automatically send your scheduled newsletters, Auto-Responders or SmartNewsletters. Please read the article on how to Setup your send process if you haven't set it up yet.
Setting up cron task on your cpanel
1. Login to your Cpanel account
2. Browse for Advance Tab located at the buttom
3. Click on Cron Jobs
4. Kindly enter your email address in Cron Email Tab, if you want to receive an email everytime the cron job runs.
5. And click Update Email.
6. Next, set your desired frequency of your cron in the "Add New Cron Job"
7. Add this cron command curl "http://www.yoursite.com/index2.php?option=com_jnews&act=cron" in command field.
8. Then, click Add New Cron Job
Click this article that explains linux crontab command.
lynx -source http://yourdomainname.com/index2.php?option=com_jnews&act=cron
There are different command line programs you can use to call the page from the command line. Not all of them may be available on a given server.
For example, you can use a Unix utility like 'wget':
wget -q -nd --delete-after 'http://www.yourwebsite.com/index2.php?option=com_jnews&act=cron'
The options:
-q = quiet (no message)
-nd = no directory
--delete-after = delete the downloaded file
Same with log file
wget -q -nd --delete-after 'http://www.yourwebsite.com/index2.php?option=com_jnews&act=cron' -O /home/public_html/cache/dull
When using SSL, add one additional argument when calling wget: --no-check-certificate.
Do not put “--no-check-certificate” between the -0 and the -.
*/15 * * * * /usr/bin/wget --no-check-certificate --quiet -O - 'https://www.yourwebsite.com/index2.php?option=com_jnews&act=cron'
Note in this example that the output is thrown away (to /home/public_html/cache/dull ).
A number of users of jNews have found that 'wget' sometimes fails. Especially if you have trouble with email digests not being sent on a daily basis to all users, an alternative command that solves the problem is:
php 'http://www.yourwebsite.com/index2.php?option=com_jnews&act=cron'
1. Log into DirectAdmin as user
2. At Advanced Features select Cronjobs
If you want a schedule every 10 minutes define as below:
Minute: */10
Hour: *
Day of Month: *
Month: *
Day of Week: *
Command: /usr/bin/curl -s -o /dev/null "http://www.yoursite.com/index2.php?option=com_jnews&act=cron"
Important are the quotes around the URL. Otherwise all looks perfect but mail will never be send.
Creating a Scheduled Task
Configuring the task