I have the following Shell in my CakePHP app:
<?php
class MyShell extends Shell {
public function sendEmail() {
App::uses('CakeEmail', 'Network/Email');
$email = new CakeEmail();
$email->from('cameron@driz.co.uk');
$email->to('cameron@driz.co.uk');
$email->subject('Test Email from Cron');
$result = $email->send('Hello from Cron');
}
}
?>
Which I am trying to run every 5 minutes as a test on my Media Temple Grid Service host.
/home/####/domains/driz.co.uk/html/app && Console/cake my_shell send_email
cd /home/####/domains/driz.co.uk/html && Console/cake my_shell send_email
cd /home/####/domains/driz.co.uk/html/app && Console/cake my_shell send_email
php /home/####/domains/driz.co.uk/html/app/Console/Command/MyShell.php
I have tried ALL of the above but none of them work... Any ideas why?
(Note: that the times are missing as you specify these in the admin panel separate to the actual command)
Has anyone got any experience running CakePHP cron jobs on Media Temple? I have asked MT support, and they explained that the first 3 lines wouldn't work because they are not direct commands to the files (so apparently the CakePHP docs are for the terminal only).