Versions Compared

Key

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

A cronjob is a script that will be executed by cron, a time-based job scheduler.

Using plugins in a cronjob

When developing a cronjob (a real one, not a pseudo-cronjob) it is often necessary to use functionality that is provided by plugins. In order to use this you have to include the plugins yourself. This can be achieved by adding theses lines to your code:

Code Block
languagephp
linenumberstrue
// include plugins & call hook after plugins are loaded
$cfg = cRegistry::getConfig();
require_once $backendPath . $cfg['path']['includes'] . 'functions.includePluginConf.php';
cApiCecHook::execute('Contenido.Frontend.AfterLoadPlugins');

Pseudo-cron

Note
CONTENIDOs pseudo-cron is still to be documented.