public function cron() { $context = Context::getContext(); //need for Product::getPriceStatic() method $context->employee = true; Cmsearch::indexation(); }