Login   Register  
PHP Classes

PHP Cron: Parse cron schedules to find when cron job ran

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author Author  
Picture of Mick Sear
Name: Mick Sear is available for providing paid consulting. Contact Mick Sear .
Packages: 8 Browse all classes by Mick Sear Browse all classes by
Country: United Kingdom United Kingdom - PHP jobs in United Kingdom
Age: 40
All time rank: 392 in United Kingdom United Kingdom
Week rank: 240 Down11 in United Kingdom United Kingdom Down
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

  Detailed description   Download Download .zip .tar.gz  
This class can parse cron tab schedules. It does not parse cron tab files themselves, but instead, can determine when a cron job should have last run, given the schedule in cron tab format (like 0 5 * * 1-4)

It can determine when a cron job should have last run, which can be used in conjunction with database logging to determine if a backup cron server should run a job or to create a complete PHP alternative to cron (maybe distributed across several servers). Updated with some example code and documentation explaining how it might be implemented.

  Classes of Mick Sear  >  PHP Cron  >  Download Download .zip .tar.gz  >  Support forum Support forum (2)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: PHP Cron
Base name: phpcron
Description: Parse cron schedules to find when cron job ran
Version: -
PHP version: -
License: GNU General Public License (GPL)
All time users: 6158 users
All time rank: 323
Week users: 3 users
Week rank: 740 Down
  Groups   Rate classes User ratings   Trackback  
  Applications   Related links   Files Files  

Group folder image Time and Date Time and date values, formats and conversion View top rated classes
Group folder image Files and Folders Listing, accessing and manipulating files and folders View top rated classes
Group folder image Systems administration System configuration and management View top rated classes

  Innovation Award  
PHP Programming Innovation award winner
June 2005

Prize: One subscription to the PDF edition of the magazine by PHP Architect
Cron is a popular tool on Unix/Linux systems that can execute periodic jobs given a schedule definition. The job schedule definitions are stored in files named cron tabs.

This class can parse cron tab files to retrieve the schedules of the jobs that are defined. It can be useful to determine when was the last time or will be the next time that a jobs will be executed. It can be useful to applications that depend on the knowledge of the scheduled jobs.

Manuel Lemos

  User ratings  
RatingsUtility Consistency Documentation Examples Tests Videos Overall Rank
All time: Sufficient (66.7%) Sufficient (75.0%) Sufficient (66.7%) Sufficient (66.7%) - - Not sure (54.2%) 1307
Month: Not yet rated by the users

  Trackback links  
Link Description
CMS Ideas (What would you like to see?) Rather than an Ajax system, I would suggest using Cron in Php. Here are some interesting articles on it...

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

  Related links  
Link Description
Author's tutorials Author's tutorials

  Files folder image Files  
File Role Description
Plain text file CronParser Class Class to interpret cron schedule
Accessible without login Plain text file Cron_parser_documentation.txt Doc. Documentation on intended usage
Accessible without login Plain text file example.php Example Example of use

Download Download all files: phpcron.tar.gz phpcron.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.