I have been developing a custom module that I need to run through a cron job. When the cron job runs I get the following error
Code: Select all
Stack trace:
#0 {main}
thrown in /home/Mywebsite/public_html/catalog/controller/extension/module/my_module.php on line 2
[08-Dec-2022 15:42:02 Europe/Athens] PHP Fatal error: Uncaught Error: Class 'Controller' not found in /home/Mywebsite/public_html/catalog/controller/extension/module/my_module.php:2
Code: Select all
<?php
class ControllerExtensionModuleMyModule extends Controller {
public function index() {
file_put_contents("mylog.log","do something here" . "\n",FILE_APPEND);
}
}
Code: Select all
curl https://www.mywebsite.com/index.php?route=extension/module/my_module
Thanks in advance for any ideas.