Skip to content

Commit

Permalink
optimize the call of schedule:run command
Browse files Browse the repository at this point in the history
  • Loading branch information
hhxsv5 committed Jun 6, 2023
1 parent 078b174 commit 4855c43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/LaravelScheduleJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ public function isImmediate()

public function run()
{
Portal::runArtisanCommand(base_path(), 'schedule:run >> /dev/null 2>&1');
Portal::runArtisanCommand(base_path(), 'schedule:run >> /dev/null 2>&1 &');
}
}

3 comments on commit 4855c43

@1937-lirui
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
在schedule里面使用Task::deliver 会报错,进程不同 投递不成功

@1937-lirui
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
以前这种写法是可行的

@hhxsv5
Copy link
Owner Author

@hhxsv5 hhxsv5 commented on 4855c43 Oct 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

以前的写法也不能投递任务,schedule:run会创建子进程执行

Please sign in to comment.