【发布时间】:2016-05-20 16:21:00
【问题描述】:
我在 ..\app\commands\ 处创建了 job.php
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);
}
我在命令提示符下手动输入了“php artisan cron:run”,它运行完美。我怎么能安排这个?我知道有 * * * * * 之类的东西,但是,我不知道如何使用 * * * * *
我正在使用 Laravel-4.2
请帮忙
【问题讨论】:
标签: php mysql scheduler laravel-4.2