Source for file _cronjob.class.php
Documentation is available at _cronjob.class.php
* This file implements the Cronjob class, which manages a single cron job as registered in the DB.
* This file is part of the evoCore framework - {@link http://evocore.net/}
* See also {@link http://sourceforge.net/projects/evocms/}.
* @copyright (c)2003-2010 by Francois PLANQUE - {@link http://fplanque.net/}
* {@internal License choice
* - If you have received this file as part of a package, please find the license.txt file in
* the same folder or the closest folder above for complete license terms.
* - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
* then you must choose one of the following licenses before using the file:
* - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
* - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
* {@internal Open Source relicensing agreement:
* {@internal Below is a list of authors who have contributed to design/coding of this file: }}
* @author fplanque: Francois PLANQUE.
* @version $Id: _cronjob.class.php,v 1.6 2010/02/08 17:52:14 efy-yury Exp $
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
load_class( '_core/model/dataobjects/_dataobject.class.php', 'DataObject' );
* Manages a single cron job as registered in the DB.
* @param table Database row
// Call parent constructor:
parent::DataObject( 'T_cron__task', 'ctsk_', 'ctsk_ID', '', '', '', '' );
{ // Loading an object from DB:
$this->ID =
$db_row->ctsk_ID;
$this->name =
$db_row->ctsk_name;
$this->params =
$db_row->ctsk_params;
* By default, all values will be considered strings
* @param string parameter name
* @param mixed parameter value
* @param boolean true to set to NULL if empty value
* @return boolean true, if a value has been set; false if it has not changed
function set( $parname, $parvalue, $make_null =
false )
return $this->set_param( $parname, 'string', substr( $parvalue, 0, 50 ), false );
return $this->set_param( $parname, 'string', $parvalue, $make_null );
* Get a member param by its name
* @param mixed Name of parameter
* @return mixed Value of parameter
return parent::get( $parname );
* $Log: _cronjob.class.php,v $
* Revision 1.6 2010/02/08 17:52:14 efy-yury
* Revision 1.5 2009/09/14 12:53:57 efy-arrin
* Included the ClassName in load_class() call with proper UpperCase
* Revision 1.4 2009/03/08 23:57:42 fplanque
* Revision 1.3 2008/01/21 09:35:28 fplanque
* Revision 1.2 2007/09/04 22:08:31 fplanque
* Revision 1.1 2007/06/25 10:59:47 fplanque
* MODULES (refactored MVC)
* Revision 1.4 2007/04/26 00:11:09 fplanque
* Revision 1.3 2006/11/24 18:27:24 blueyed
* Fixed link to b2evo CVS browsing interface in file docblocks
* Revision 1.2 2006/09/21 15:26:28 blueyed
* Fixed dependency (and tests)
* Revision 1.1 2006/08/24 00:43:28 fplanque