I am trying to implement cron job in cakephp 3 shell script but it is not working in cpanel.
below is my cron job code blog is my cakephp 3 folder
cd /home/mmentert/public_html/abc.com/blog && bin/cake hello main
Cakephp 3 shell class file
namespace AppShell;
use CakeConsoleShell;
use AppControllerUsersController;
class HelloShell extends Shell {
public function main() {
$userinfo=new UsersController();
$data=$userinfo->useremail();
$this->out($data);
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…