dotAdmin has a simple task scheduler which runs every hour. You can attach new processes to the task scheduler by adding a new row to the `crontask` table of your site database:
The task include will be called [crontask_name].crontask.class.php, have a classname of [Crontask_name]CronTask, and must have a doTask() method. eg:
Class ExampleCronTask{
protected $obj_db = null;
public function __construct(){
// Try get database
$this->obj_db = InvDB::getDatabase('default');
}
public function doTask(){
// do stuff here
return true;
}
}
You can test all crontasks by running:
/var/www/dotadmin/3.0/shared/scripts/crontasks.sh 3.0
You can test an individual site cron schedule by navigating to /var/www/dotadmin/3.0/shared/scripts and running:
php crontasks.php -- site=[sitename]