I am trying to set a cron using cakephp3 shell.
my sample code :
> <?php
namespace App\Shell; use Cake\Console\Shell; class UserShell extends Shell {
public function getOptionParser() { $parser = parent::getOptionParser();
return $parser; }
public function main() { $this->out($this->OptionParser->help());
$this->loadModel('Users'); $user = $this->Users->find('all')->first(); $role = 'user'; $this->Users->updateall( ['role'=>$role ],['id'=>$id] ); } }
And the cron path is :
cd /home/birelqar/public_html/SMS && bin/cake User
but its not working.help please.
in my log file I got this:
/bin/bash: bin/cake: Permission denied