Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-18-2012, 01:54 AM   #1
Registered: Feb 2010
Location: Sri Lanka
Posts: 50

Rep: Reputation: 0
Unhappy How to run URL from Cron job

Dear All,

I have to configure shell scrip to do following task.

1. There is a URL to run (
2. This URL must be run every ten minutes in background.(As my view we can do it with Cron Tab).

Best Regards/
Old 06-18-2012, 02:00 AM   #2
Registered: Sep 2011
Location: Italy
Distribution: Slackware
Posts: 635

Rep: Reputation: 186Reputation: 186
What do you mean by "running a URL"?
URLs cannot be run...
Old 06-18-2012, 12:54 PM   #3
LQ Newbie
Registered: May 2012
Location: minneapolis
Distribution: rhel 3/4 (soon to add 5)
Posts: 9

Rep: Reputation: Disabled
by "run url" i'm going to assume you want to check it (and not go to some page and run some youtube video or something every ten minutes ). the curl command is useful for this


i would suggest dumping the output into a file and then grepping explicitly for something you know is constant (like the title). yahoo is a bad example, but it was just an example i used

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

there you have the title, so the page itself returned (whether the content is what you expected or not is a different question / issue). so in your case, where the page requested is not the top level, (you need the trailing /)

with the wget command, you can get files from a location. so if you were trying to get a constant update of accessible logs or pix or something, you could use that

if you want to get the access code (200, 302, 400, 500), well, i don't know... i have been trying to do this with telnet to get the access code info:
[glamiss@myserver ~]$ telnet 0 80
Connected to 0.
Escape character is '^]'.
get /webservice/

HTTP/1.1 200 OK
but i don't know how to dump my telnet output

Last edited by glamiss; 06-18-2012 at 12:56 PM.
Old 06-18-2012, 12:55 PM   #4
Senior Member
Registered: Oct 2004
Distribution: Fedora Core 4, 12, 13, 14, 15, 17
Posts: 2,279

Rep: Reputation: 249Reputation: 249Reputation: 249
To access a url you have to accept what it sends you. You can throw that data away or whatever. But you must take it. All CGI programs have to return something, so be cool and accept it. Use curl or wget.
Depending on OS, you might be able to open a browser instead (fedora = htmlview).


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Run cron job in every 20 second ust Linux - Newbie 13 01-15-2015 01:01 PM
Debian daily cron job won't run, but does run in cron.hourly. sandersch Linux - General 7 05-24-2012 01:50 AM
Can't get a cron job to run derzok Linux - General 10 12-16-2007 04:00 AM
Loading website URL in a Cron Job njdube Linux - General 5 04-17-2006 11:45 PM
Did my Cron job run? ryedunn Linux - Newbie 2 02-25-2004 08:59 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:33 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration