Cron Job to call a Web Page?

redbrad1

Member
Oct 19, 2006
13
0
151
I have been looking all over the internet and I can not seem to find how to setup CRON to call a web page. I do not want it to just call the page but actually request the URL so it is phrased by the engine.

Can someone help point me in how to do this?

Brad
 
Last edited:

gupi

Well-Known Member
Apr 27, 2004
125
0
166
Try one of these in your crontab:
Code:
*/15 * * * * /usr/bin/lynx http://www.mydom.ain/page.html > /dev/null

*/15 * * * * GET http://www.mydom.ain/page.html > /dev/null
 

redbrad1

Member
Oct 19, 2006
13
0
151
wget worked great but now I am starting to see files appear in my FTP directory from it calling this script. Is there a way to not have it create a temporary file or to delete the temporary file after its done with it?
 

redbrad1

Member
Oct 19, 2006
13
0
151
Adam,

This requests a url that you specify and will not create the temporary files?

Code:
lynx -dump http://www.CoolLookingSite.com/automated-page.php
 

HelloAdam

Well-Known Member
Nov 6, 2005
145
0
166
Adam,

This requests a url that you specify and will not create the temporary files?

Code:
lynx -dump http://www.CoolLookingSite.com/automated-page.php
Hey,

Never did for me. Also where are you seeing these temporary files (what folder)?

From,
Ada
 

redbrad1

Member
Oct 19, 2006
13
0
151
The files are being stored in /home/accountname/ so the folder looks like below. All the items in red I delete out once a day or whenever I get a chance and of course I didnt feel like listing out all 38 that are currently in the directory :rolleyes:

.cpanel-datastore
etc
mail
public_ftp
public_html
tmp

.bash_logout
.bash_profile
.bashrc
.contactemail
.dns
.emacs
.gtkrc
.lastlogin
.spamkey
final-ticket-sales.php
final-ticket-sales.php.1
final-ticket-sales.php.10
final-ticket-sales.php.11
final-ticket-sales.php.12
final-ticket-sales.php.13
final-ticket-sales.php.14
final-ticket-sales.php.15
 

HelloAdam

Well-Known Member
Nov 6, 2005
145
0
166
Hey,

Well using my command, doesn't do that on my end. It could also be a root server setting which could be causing this, however I wouldn't know which one. If worst comes to worst, you can always create another cronjob to delete those files :p

From,
Adam
 

redbrad1

Member
Oct 19, 2006
13
0
151
Looks like

Code:
lynx -dump http://www.CoolLookingSite.com/automated-page.php
did the trick, and does not create a temporary file. Thanks for your help.