<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 19 Jun 2013 14:45:58 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Michael Dowling's Blog: Cron Expression Parsing in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18043</guid>
      <link>http://www.phpdeveloper.org/news/18043</link>
      <description><![CDATA[<p>
<i>Michael Dowling</i> has <a href="http://mtdowling.com/blog/2012/06/03/cron-expressions-in-php/">shared a new tool</a> on his blog today - a parser for crontab files that can be used directly from within PHP - <a href="https://github.com/mtdowling/cron-expression">cron-expression</a>.
</p>
<blockquote>
When faced with the task of creating the cron expression parsing part of this system, I searched high and low for an existing implementation in PHP that implemented the full feature set of a modern cron expression. Based on the context of this article, you probably guessed that I didn't find one. I posted the original code I came up with to <a href="http://stackoverflow.com/questions/321494/calculate-when-a-cron-job-will-be-executed-then-next-time/3453872#3453872">StackOverflow</a> and eventually <a href="https://github.com/mtdowling/cron-expression">open sourced the project</a>.
</blockquote>
<p>
Not only does the tool let you read from the cron files but it also lets you do other fun things like:
</p>
<ul>
<li>Determine the next run date for the program
<li>Calculate the next X number of run dates/times
<li>Find the last run date of the program
<li>Check to see if an expression will run on a certain date
</ul>
<p>
The full source for the tool is available for download (and pull requests!) over <a href="https://raw.github.com/mtdowling/cron-expression">on github</a>.
</p>]]></description>
      <pubDate>Mon, 04 Jun 2012 12:03:52 -0500</pubDate>
    </item>
  </channel>
</rss>
