Having trouble with the cron job we created for our site. Here's what we did:
1. Went to Cpanel and clicked Cron jobs
2. Applied the following code:
lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
3. Common Settings were set as provided in your documentation (every 30 min, every hour, every day, etc.)
We've checked the mail queue in our Jomsocial dashboard, and none of the emails have been sent. When we click on the "Execute Cron" option, it simply takes us to the frontpage of the website. The emails remain unsent.
When I contacted our hosting provider, here's what they provided:
"I have checked the cron service's' logs and I see that the cron command has been executed successfully. Here are the latest log lines:
[2014-08-02 18:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-02 19:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-02 20:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-02 21:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-02 22:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-02 23:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 00:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 01:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 02:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 03:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 04:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 05:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 06:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 07:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 08:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 09:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 10:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 11:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 12:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 13:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 14:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 15:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
[2014-08-03 16:30:01]: CMD: theperf5 lynx -source "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
According to the JomSocial documentation the cron command is set correctly. If the above command does not work you can try to set one of the alternative commands:
wget -O /dev/null "
www.theperfectshape.net/index.php?option..._community&task=cron
" > /dev/null
or
curl "
www.theperfectshape.net/index.php?option..._community&task=cron
" >/dev/null 2>&1
You should also check if yuor email settings are set correctly, I see this error in the email logs:
2014-08-03 06:07:11 [31309] H=(delivery.mailspamprotection.com) [184.154.48.170]:56879 I=[173.236.52.210]:25 F=<> rejected RCPT <This email address is being protected from spambots. You need JavaScript enabled to view it.>: SITEGROUND: No Such mailbox here
If you wish to use this email address This email address is being protected from spambots. You need JavaScript enabled to view it. you need to create it first from your cPanel -> Email Accounts.
I updated the email to This email address is being protected from spambots. You need JavaScript enabled to view it., but it still did not resolve the cron job. I again contacted our provider, and they responded:
According to the log file your cron jobs are being executed properly per one hour. I confirm the cron job set in cPanel is being executed properly.
Unfortunately I can not say why the jobs in the administrative panel are still being displayed as pending. I would advise you to contact the developer of the plugin that you are using and ask the person for further assistance. If the developer provides some additional settings that we should made on your account, update the ticket and we will gladly help.
Hi, Tony Martinez.
This is caused by sh404sef plugin. It creates wrong URL for cron job url and this redirect to start page. I disabled sh404sef plugin and fired cron manually from Mail Queue. All pending emails was sent. It could be a conflict or rather extension misconfiguration. Please, contact with sh404sef developers and ask them for assistance.
Awesome, thanks! We started receiving emails this morning.