LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-26-2008, 10:13 AM   #1
jasonx22
LQ Newbie
 
Registered: Jun 2008
Posts: 8

Rep: Reputation: 0
how execute/visit a site using the cron daemon?


hi,
i need to execute/visit a site to check if the site is up or not i have a server that have cron shedule that can execute a php file now how can i execute/visite a site using the same way as i execute a file?
thanks a lot for your help
 
Old 06-26-2008, 11:56 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Switzerland
Distribution: Gentoo
Posts: 705

Rep: Reputation: 80
Perhaps by using wget? E.g. "wget http://www.yoursite.com", it gets downloaded to your local pc, and you check that some contents have been downloaded?
 
Old 06-27-2008, 04:08 AM   #3
jasonx22
LQ Newbie
 
Registered: Jun 2008
Posts: 8

Original Poster
Rep: Reputation: 0
hi,
i dont want grab a file of the site my question is this:
the site have a script that run only with the correct url "index.php?etc&etc"
and when i visit the site with that url the site perform maintense of the content and send emails to the users etc
so i donīt want do this manualy or see if the site is online or not i just want a way to enter in cron job to visit a site as same way google agent visit or as any single person visit i have see the wget but so far i he dont does want i want probaly because i not using the correct command sintax
so is this that i need a way to the cron job visit the url just that
thanks for your help
 
Old 06-27-2008, 08:20 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,909

Rep: Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326Reputation: 1326
You can create a script and use lynx (or even firefox if you want) to visit the site. Afterwards you should kill lynx. Something like that:
Code:
#!/bin/sh
/usr/bin/lynx http://yoursite.com/index.php?etc&etc
sleep 30
/bin/pkill -9 lynx
sleep 30 means to wait for 30 seconds before killing lynx. Maybe you want to change that value.
Then put that script in your crontab to run when you want it to run.

Regards
 
  


Reply


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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell script using /etc/cron.hourly to execute cron.php file? rioguia Programming 3 06-11-2008 08:09 AM
Client site visit and mileage tracking software? cm1967 Linux - Software 3 04-14-2008 05:34 AM
cron hourly, daily, cron.d jobs don't execute eggsmartha Linux - General 3 09-17-2007 06:37 PM
visit linux web from windows, the site couldn't execute "index.html" automaticlly Meditator Linux - Networking 3 03-20-2004 11:10 AM
Come visit our new site !! xconspirisist General 1 03-14-2004 07:58 AM


All times are GMT -5. The time now is 11:29 PM.

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