Cron Job with Wget
« on: April 01, 2012, 10:52:01 PM »
What would the code be to have a Cron Job run using Wget?  Please let me know.
Re: Cron Job with Wget
« Reply #1 on: April 02, 2012, 01:37:12 PM »
Hello,

it will look like:
wget [ External links are visible to logged in users only ]
Re: Cron Job with Wget
« Reply #2 on: April 02, 2012, 01:54:30 PM »
I did as you suggested and I am getting the following error:

/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file

Please advise.
Re: Cron Job with Wget
« Reply #3 on: April 03, 2012, 10:00:54 PM »
Please contact your host to find out if "wget" is supported in cron tasks.
Re: Cron Job with Wget
« Reply #4 on: April 04, 2012, 12:56:39 AM »
Yes, I have many other cron tasks set up with wget.

FYI: If I removed the &resume=1, it runs.

Please advise.
Re: Cron Job with Wget
« Reply #5 on: April 05, 2012, 10:55:54 AM »
Please try to enclose URL in quotes:
wget "[ External links are visible to logged in users only ]"
Re: Cron Job with Wget
« Reply #6 on: April 05, 2012, 12:26:53 PM »
That is exactly what I have.  I still get the error.

Please advise.
Re: Cron Job with Wget
« Reply #7 on: April 05, 2012, 01:33:24 PM »
You can try single quotes instead:
wget '[ External links are visible to logged in users only ]'
Re: Cron Job with Wget
« Reply #8 on: April 05, 2012, 01:39:20 PM »
I did the single quote and this is what I get...

--2012-04-05 07:37:01-- [ External links are visible to forum administrators only ] Resolving mysite.com... myip Connecting to mysite|myip|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: `index.php?op=crawlproc&resume=1.1' 0K .......... .......... .......... .......... ...... 2.04K=23s 2012-04-05 07:37:28 (2.04 KB/s) - `index.php?op=crawlproc&resume=1.1' saved [47413]

Does that mean it is working correctly?