By Angelo Luidens on Sunday, 20 September 2015
Replies 5
Likes 0
Views 1K
Votes 0
I am having an issue with setting up the cron job.

This is the statement I entered for HostGator:
/usr/bin/wget -O "http://stargue.com/index.php?option=com_easyblog&task=cron";;

It gives the following error:
wget: missing URL
Usage: wget [OPTION]... [URL]...

Try `wget --help' for more options.

I have tried this statement:
/usr/bin/wget "http://myjoomla.com/index.php?option=com_easyblog&task=cron";;

It gave me the following results:
--2015-09-20 07:00:11-- http://myjoomla.com/index.php?option=com_easyblog&task=cron
Resolving stargue.com... #.#.#.#
Connecting to myjoomla.com|#.#.#.#|:80... connected.
HTTP request sent, awaiting response... 303 See other
Location: http://myjoomla.com/en-us/?option=com_easyblog&task=cron [following]
--2015-09-20 07:00:15-- http://myjoomla.com/en-us/?option=com_easyblog&task=cron
Reusing existing connection to myjoomla.com:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/x-json]
Saving to: `index.php?option=com_easyblog&task=cron'

0K 35.6M=0s

2015-09-20 07:00:18 (35.6 MB/s) - `index.php?option=com_easyblog&task=cron' saved [640]

I assume this is totally correct. I would appreciate if you could confirm this. If it is correct than the full statement will be:
/usr/bin/wget "http://myjoomla.com/index.php?option=com_easyblog&task=cron";;

Thank you in advance.
Angelo.
Hey Angelo,

Yes, that was correct

You can see your server response already shown connected and saved when run the cronjob.

May i know your user is it still can't get the email notification when new post is published?
·
Sunday, 20 September 2015 20:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi. Arlex,

I do not understand your question:
'May i know your user is it still can't get the email notification when new post is published?'

The email notification after posting do go out. I have received them. However, I do get a notification of the cronjob though, every time it is executed:

--2015-09-21 15:00:06-- http://myjoomla.com/index.php?option=com_easyblog&task=cron
Resolving stargue.com... #.#.#.#
Connecting to stargue.com|#.#.#.#|:80... connected.
HTTP request sent, awaiting response... 303 See other
Location: http://myjoomla.com/en-us/?option=com_easyblog&task=cron [following]
--2015-09-21 15:01:19-- http://myjoomla.com/en-us/?option=com_easyblog&task=cron
Reusing existing connection to stargue.com:80.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/x-json]
Saving to: `/dev/null'

0K 63.8M=0s

2015-09-21 15:01:21 (63.8 MB/s) - `/dev/null' saved [640]

The statement use for the cronjob is:
/usr/bin/wget -O /dev/null "http://myjoomla.com/index.php?option=com_easyblog&task=cron";

I am assuming the -O /dev/null is to sent the output (the text above) to /dev/null and thus I should not get an email as mentioned above. Or should I use this '>/dev/null 2>&1' instead of '/dev/null' or put '>/dev/null 2>&1' at the end of the cron statement as well?

Thank you for your assistance in advance.

Best regards,
Angelo.
·
Tuesday, 22 September 2015 04:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Angelo,

You should put the > /dev/null 2>&1 at the end of the cron statement. Please give it a try.
·
Tuesday, 22 September 2015 10:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Thanks Nik. It seems to be working. So the full cron statement is:
/usr/bin/wget "http://myjoomla.com/index.php?option=com_easyblog&task=cron"; > /dev/null 2>&1

Best regards,
Angelo
·
Tuesday, 22 September 2015 21:45
·
0 Likes
·
0 Votes
·
0 Comments
·
You're welcome, glad to heard your issue resolved.
·
Wednesday, 23 September 2015 00:31
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post