I created job.php at ..\app\commands\
public function fire() {
$this->dailyAt('09:00', function(){
Mail::send('emails.test', array(), function($message) {
$message->to('address', '')->subject('subject')->attach('path');
});
});//end daily
}
protected function dailyAt($time, callable $callback){
if(date('H:i', $this->timestamp) === $time) call_user_func($callback);
}
I put 'php artisan cron:run' on command prompt manually, it runs perfectly. How could I schedule this? I know there is something like * * * * *, however, I have no idea how to use of * * * * *
I am using Laravel-4.2
Please Help