PHP Classes

Cron PHP Job Manager: Load and run periodic jobs executed by classes

Recommend this page to a friend!
  Info   View files Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 52%Total: 427 All time: 6,342 This week: 455Up
Version License PHP version Categories
cron-php 1GNU General Publi...5.4PHP 5, Time and Date, Language
Description 

Author

This class can load and run periodic jobs executed by classes.

It can scan a jobs directory and load PHP class files that implement those jobs.

The class can determine if it is time to execute the jobs by querying the job classes for the parameters of frequency and priority.

Picture of Jacob Fogg
  Performance   Level  
Name: Jacob Fogg <contact>
Classes: 7 packages by
Country: United States United States
Age: 44
All time rank: 1048147 in United States United States
Week rank: 275 Up28 in United States United States Up
Innovation award
Innovation award
Nominee: 3x

Winner: 1x

Example

<?php
/**
 * Here is an example script for setting up the CronPhp object. To get this
 * working, all you would need to do is have this PHP file called regularly. If
 * you wanted, you could even attach this file to your websie or even your
 * monitoring script (even free services like pingdom). Or call it via a
 * standard cron service, either through wget or even the PHP CLI would work.
 *
 * Once that is established, simply create as many Jobs in the Jobs directory.
 * You just need to be sure each job file is prefixed with the string Job and
 * that you extend JobAbstract.php. See Fogg/Jobs/JobExample.php as a sample
 * job implementation.
 */
//This will be a reference to your class autoloader
require __DIR__ . '/init_autoloader.php';

//use the class (this will include the required files)
use Fogg\CronPhp\CronPhp;
//Instantiate the CronPhp object
$cron = new CronPhp();
//Run it
$cron->run();

//That's it, all o


  Files folder image Files  
File Role Description
Files folder imageFogg (1 directory)

  Files folder image Files  /  Fogg  
File Role Description
Files folder imageCronPhp (3 files, 1 directory)

  Files folder image Files  /  Fogg  /  CronPhp  
File Role Description
Files folder imageJobs (1 file)
  Plain text file CronPhp.php Class The controller class used for managing and executing system tasks.
  Accessible without login Plain text file Example.php Example Here is an example script for setting up the CronPhp object.
  Plain text file JobAbstract.php Class An abstract class used to implement individual cronjobs.

  Files folder image Files  /  Fogg  /  CronPhp  /  Jobs  
File Role Description
  Plain text file JobExample.php Class A sample job used to base other jobs on.

 Version Control Unique User Downloads Download Rankings  
 0%
Total:427
This week:0
All time:6,342
This week:455Up
 User Ratings  
 
 All time
Utility:75%StarStarStarStar
Consistency:81%StarStarStarStarStar
Documentation:-
Examples:68%StarStarStarStar
Tests:-
Videos:-
Overall:52%StarStarStar
Rank:2355