LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   how execute/visit a site using the cron daemon? (https://www.linuxquestions.org/questions/linux-server-73/how-execute-visit-a-site-using-the-cron-daemon-651830/)

jasonx22 06-26-2008 10:13 AM

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

Pearlseattle 06-26-2008 11:56 AM

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?

jasonx22 06-27-2008 04:08 AM

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

bathory 06-27-2008 08:20 AM

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


All times are GMT -5. The time now is 10:15 PM.