PHP Classes

File: Fogg/CronPhp/Example.php

Recommend this page to a friend!
  Classes of Jacob Fogg  >  Cron PHP Job Manager  >  Fogg/CronPhp/Example.php  >  Download  
File: Fogg/CronPhp/Example.php
Role: Example script
Content type: text/plain
Description: Here is an example script for setting up the CronPhp object.
Class: Cron PHP Job Manager
Load and run periodic jobs executed by classes
Author: By
Last change:
Date: 7 years ago
Size: 957 bytes


Class file image Download
 * 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

//That's it, all o

For more information send a message to info at phpclasses dot org.