XML Sitemaps Generator

Author Topic: Cron Job with Wget  (Read 8568 times)

info1585

  • Registered Customer
  • Approved member
  • *
  • Posts: 6
Cron Job with Wget
« on: April 01, 2012, 09:52:01 PM »
What would the code be to have a Cron Job run using Wget?  Please let me know.

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10624
Re: Cron Job with Wget
« Reply #1 on: April 02, 2012, 12:37:12 PM »
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

info1585

  • Registered Customer
  • Approved member
  • *
  • Posts: 6
Re: Cron Job with Wget
« Reply #2 on: April 02, 2012, 12: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.

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10624
Re: Cron Job with Wget
« Reply #3 on: April 03, 2012, 09:00:54 PM »
Please contact your host to find out if "wget" is supported in cron tasks.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

info1585

  • Registered Customer
  • Approved member
  • *
  • Posts: 6
Re: Cron Job with Wget
« Reply #4 on: April 03, 2012, 11:56:39 PM »
Yes, I have many other cron tasks set up with wget.

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

Please advise.

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10624
Re: Cron Job with Wget
« Reply #5 on: April 05, 2012, 09:55:54 AM »
Please try to enclose URL in quotes:
wget "http://yourdpomain.com/generator/index.php?op=crawlproc&resume=1"
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

info1585

  • Registered Customer
  • Approved member
  • *
  • Posts: 6
Re: Cron Job with Wget
« Reply #6 on: April 05, 2012, 11:26:53 AM »
That is exactly what I have.  I still get the error.

Please advise.

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10624
Re: Cron Job with Wget
« Reply #7 on: April 05, 2012, 12:33:24 PM »
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

info1585

  • Registered Customer
  • Approved member
  • *
  • Posts: 6
Re: Cron Job with Wget
« Reply #8 on: April 05, 2012, 12: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 admins 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?

XML-Sitemaps Support

  • Administrator
  • Hero Member
  • *****
  • Posts: 10624
Re: Cron Job with Wget
« Reply #9 on: April 06, 2012, 01:21:14 PM »
Yes, that looks correct.
Oleg Ignatiuk
www.xml-sitemaps.com
Send me a Private Message

For maximum exposure and traffic for your web site check out our additional SEO Services.

 

SMF 2.0.12 | SMF © 2014, Simple Machines
XHTML RSS WAP2