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
Printable View
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
You could put a tag in your page and use if curl and grep to see if it is there, if not report an error.
something like this would probably work:
You could even if you have a mail server running get it to mail the status to youCode:TAG=`curl yourpage.com |grep "yourtag"`
if [ -e $TAG ]
then
echo "site is up"
else
echo "site is down"
fi
hi,
i dont want see if the site is running or not i just want that cron job visit the site. my question is that:
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 :mad:
so is this that i need a way to the cron job visit the url just that:)
As long as you know the url you need to visit just use curl. Try the man pages for more info but it sounds like it will do what you need. If you need info on the crontab try googleing crontab the wikipedia page also has some usefull info cron - Wikipedia, the free encyclopedia