Cron job refresh?

learning_brain

New Member
Messages
206
Reaction score
1
Points
0
I've set up a cron job on a php file, which is reporting as being run correctly...

However, I have a refresh <META HTTP-EQUIV=Refresh CONTENT="1"> normally when browsing manually.

Does this refresh continue after it's first been run as a cron job, or does it stop after one page load, or does it over-write the previous loops?

I don't want thousands of the same php file running as crons!
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
The meta refresh is equivalent to the HTTP Refresh header, which only HTTP user agents pay any attention to. Cron doesn't process HTML and it doesn't load pages, it runs commands. The most processing it ever does with output is e-mail it.

Which loop are you referring to in "over-write the previous loops?" Each time cron runs a job, it's separate from the other runs.
 
Last edited:

learning_brain

New Member
Messages
206
Reaction score
1
Points
0
Welcome back Misson!

Below is an e-mail report of one cron job

HTML:
X-Powered-By: PHP/5.2.6
Content-type: text/html

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<META HTTP-EQUIV=Refresh CONTENT="1">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Real Time High Quality Image Crawler.  High Definition Photograph
Crawler</title>
<style type="text/css">
<!--

body {
        font-family: "Courier New", Courier, monospace;
        font-size: 13px;
        color: #EEEEEE;
        background-color: #000000;
}
-->
</style>
</head>

<body>

<p><a href='index.php'>Home</a></p>


<!-- ******************************************* CRAWL FOR IMAGES
************************************************-->
        
        
            <hr/><a target = 'blank'
href='http://www.lbpcentral.com/forums/search.php?do%3Dfinduser%26userid%3D9236%26contenttype%3DvBForum_Post%26showposts%3D1'>http://www.lbpcentral.com/forums/search.php?do%3Dfinduser%26userid%3D9236%26contenttype%3DvBForum_Post%26showposts%3D1</a>
is being tested.<br/>URL is an html page.  Crawling  for images.<hr/>| |
| | | | <hr/>Page crawl complete at : 22/07/2010 00:27:01    
        <!--*************************************************** END IMAGE CRAWL
****************************************-->
</body>
</html>

Which means it looks like it has processed the php correctly

The "loop" I was referring to was the loop of the refresh only, which is limitless, but if cron doesn't process the html, it won't refresh internally so my (* * * * *) setting should run it once every minute then die.

Am I right?
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
It will run the cron until it's finished it's output, or the max execution time is reached, as far as I know.
 

learning_brain

New Member
Messages
206
Reaction score
1
Points
0
Well, it's been running now for over 24 hours and doing what it's supposed to so I guess it's doing what it should!

Rich
 
Top