GET paramets in CRON job <p>I have a FOR loop for parsing xml file as parts, but I using a $_GET paramets to receive variable sending at the end of loop in URL (meta http-equiv="Refresh" content="0; url...). In Web browser everything works fine but I want to use CRON job to do it automatically. So it is possible to do something like this? I'll be very grateful for any advice or example</p> <p>My code:</p> <pre><code> $name = 'tmp_add_xml'; if(isset($_GET['file'])){ $xmlfile = 'import/'.$_GET['file'].'.xml'; } else { $xmlfile = 'import/'.$name.'.xml'; $xmlurl = 'URL_XML_FILE'; $downxml = file_get_contents($xmlurl); file_put_contents($xmlfile, $downxml); } $xml = simplexml_load_file($xmlfile); $xml_offer = $xml-&gt;xpath("//offer"); $total = count($xml_offer); if(isset($_GET['x']) &amp;&amp; isset($_GET['exist']) &amp;&amp; isset($_GET['added'])){ $x = $_GET['x']; $product_exist = $_GET['exist']; $product_added = $_GET['added']; } else { $x = $product_exist = $product_added = 0; } $limit = $x+1000; for($z = $x; $z &lt;= $limit; $z++){ $productid = $xml_offer[$z]-&gt;id; if(mysql_num_rows(mysql_query("SELECT reference FROM ps_product WHERE reference = '".$productid."'")) &gt; 0){ $product_exist++; } else { $product_added++; } if($z==$total){ echo 'Import 100%'; exit; } elseif($z==$limit){ print '&lt;meta http-equiv="Refresh" content="0; url='.$_SERVER['PHP_SELF'].'?x='.($x+1).'&amp;file='.$name.'&amp;exist='.$product_exist.'&amp;added='.$product_added.'"&gt;'; exit; } $x++; } </code></pre> <p>URL: script_name.php?x=VARIABLE&amp;file=VARIABLE&amp;exist=VARIABLE&amp;added=VARIABLE</p>