今天測試snipet的計划任務,庫存低於警告值的時候,時候會會自動發送郵件到郵箱
class SendInventoryAlerts extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'snipeit:inventory-alerts';
可以看到 當前命令的名稱為
snipeit:inventory-alerts
我使用windows10調試的,開始:
1.打開cmd,cd.... 進入項目目錄
2.輸入 snipeit:inventory-alerts ,但是這時候出現了錯誤提示 :

最后發現是由於php版本的緣故,我現在使用的PHP版本是5.6.27
3.然后,我去修改環境變量,並且更新了當前的php版本為php7
然后重新打開cmd,輸入上述命令,出現的效果如下圖所示,大概隔了1秒做舊,立馬就收到郵件了,郵件成功發送

