【发布时间】:2019-09-06 04:15:23
【问题描述】:
我的一个模型中有一个expires_at 列,我想根据它的时间戳运行一个调度程序。
我尝试了以下代码:
$collection = Foo::first();
$schedule->call( function() {
// Do Something
})->cron( \Carbon\Carbon::parse( $collection->expires_at )->format( 'i h d m' ) . ' *' );
但是当我在过期日期运行php artisan schedule:run 时,我得到No scheduled commands are ready to run.
【问题讨论】: