<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Eoin O'Sullivan &#187; cron</title>
	<atom:link href="http://www.eoinosullivan.ie/tag/cron/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eoinosullivan.ie</link>
	<description>Web Developer based in Dublin, Ireland</description>
	<lastBuildDate>Wed, 11 Aug 2010 09:25:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>How to pass parameters to a PHP file in a cron job</title>
		<link>http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/</link>
		<comments>http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/#comments</comments>
		<pubDate>Sat, 20 Jun 2009 10:11:56 +0000</pubDate>
		<dc:creator>Eoin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.eoinosullivan.ie/?p=82</guid>
		<description><![CDATA[This is just a quick tip but it annoyed the bejaysus out of me for about an hour. I was running the job in the following format: 00*** test_file.php?a=1&#038;b=2&#038;c=3 But an error was getting thrown saying that the input file, &#8230; <a href="http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is just a quick tip but it annoyed the bejaysus out of me for about an hour. I was running the job in the following format:</p>
<p><code>00*** test_file.php?a=1&#038;b=2&#038;c=3</code></p>
<p>But an error was getting thrown saying that the input file, test_file.php?a=1&#038;b=2&#038;c=3, could not be found. With some help from the Google machine, I found that the correct format should be:</p>
<p><code>00*** test_file.php 1 2 3</code></p>
<p>And in your PHP file you can use the $argv variable to get at the paramter values</p>
<p><code>$a = argv[1];<br />
$b = argv[2];<br />
$c = argv[3];</code></p>
<p>And that should do the trick.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eoinosullivan.ie/how-to-pass-parameters-to-a-php-file-in-a-cron-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

