panx framework | Documentation | Crons

Crons

Crons are scripts that are called periodically. They are located in /crons/* in daily, weekly or monthly folder, depends on the period. Each cron should include mini-loader.php so the classes will be automatically included, the $CONFIG variable will be available etc.

Example cron:

<?php
require_once __DIR__ . "/../mini-loader.php";
$x = new APIModel();
$x->resetRateDaily();
echo "Daily rate limits reset to 0.\n";
array(3) { [0]=> string(20) "docs/v0.3/header.php" [1]=> string(19) "docs/v0.3/crons.php" [2]=> string(20) "docs/v0.3/footer.php" }