Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The pseudo-cron feature is enabled as default setting. If you want to deactivate it (this is highly recommended if you want to run the pseudo cronjobs as your files with real cronjobs instead) you have to set cfg['use_pseudocron'] = false; in the config.misc.php (line 36).

...

To add a new cronjob you have to create a new cronjob file at 'contenido/cronjobs' (use the template below if you want) and configure it´s execution period at the 'data/cronlog/crontab.txt' file.

...

The CONTENIDO cronjob plugin (default: not installed) provides information about the cronjobs and the possibility to to configure the cronjobs in the backend mode. A further feature is to start a cronjob manually.

...

Code Block
languagephp
<?php
/**
 * Template cronjob file
 *
 * @package    Core
 * @subpackage Cronjob
 *
 * @author     claus.schunk@4fb.de
 * @copyright  four for business AG <www.4fb.de>
 * @license    http://www.contenido.org/license/LIZENZ.txt
 * @link       http://www.4fb.de
 * @link       http://www.contenido.org
 */

if (!defined('CON_FRAMEWORK')) {
    define('CON_FRAMEWORK', true);
}

// CONTENIDO path
$contenidoPath = str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/';

// CONTENIDO startup process
include_once($contenidoPath . 'includes/startup.php');

require_once(cRegistry::getBackendPath() . $cfg['path']['includes'] . 'pseudo-cron.inc.php');

if (!isRunningFromWeb() || function_exists('runJob') || $area == 'cronjobs') {
	
	//implement your code here
}
?>

 

 

 

 

 

 

 

...