Phpfox_Cron

Description

Run cron jobs and store a log of all the cron jobs being executed. All cron jobs are executed via the file "include/cron/exec.php". The actual PHP code that is being executed with each cron job is stored in the database in the table "cron".

  • author: Raymond Benc
  • version: $Id: cron.class.php 1687 2010-07-22 03:13:27Z Raymond_Benc $
  • copyright: [PHPFOX_COPYRIGHT]

Located in /include/library/phpfox/cron/cron.class.php (line 18)


	
			
Variable Summary
 array $_aCrons
 object $_oCache
Method Summary
 Phpfox_Cron __construct ()
 void exec ([int $iId = null])
 int _getNextRun (int $iType, int $iEvery)
 void _update (int $iId, int $iTime)
Variables
array $_aCrons = array() (line 25)

Array of all the cron jobs we save into memory

  • access: private
object $_oCache = null (line 33)

Cache object

Methods
Constructor __construct (line 41)

Class Constructor

Cache all cron jobs and save into memory so we can call them at a later point in time when needed

  • access: public
Phpfox_Cron __construct ()
exec (line 73)

Run cron jobs

  • access: public
void exec ([int $iId = null])
  • int $iId: Is the optional ID of the cron job
_getNextRun (line 117)

Get the next time a cron job must be executed

  • return: Return the new time stamp so we can store into the db
  • access: private
int _getNextRun (int $iType, int $iEvery)
  • int $iType: Is the type_id of the cron (1 (minute), 2 (hour), 3 (day), 4 (month) or 5 (yea))
  • int $iEvery: Run every X type's
_update (line 148)

Update the cron job with the last time it was ran and the next time we need to run the cron.

We also add it into the cron log and clear the cron cache so a new cache can be created.

  • access: private
void _update (int $iId, int $iTime)
  • int $iId: ID for the cron
  • int $iTime: Time stamp of when the next run must be executed

Documentation generated on Tue, 28 Sep 2010 10:36:38 +0200 by phpDocumentor 1.4.0a2