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 Quam Plures - {@link http://quamplures.net/}
* See also {@link https://launchpad.net/quam-plures}.
* @copyright (c) 2009 - 2011 by the Quam Plures developers - {@link http://quamplures.net/}
* @copyright (c)2003-2009 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.
if( !defined('QP_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
load_class('_core/model/dataobjects/_dataobject.class.php');
* 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 );
|