Laravel 5.1 Task Scheduling on Windows

前端 未结 4 2110
感动是毒
感动是毒 2021-02-11 06:45

I\'m trying to get Laravel 5.1 Task Scheduling working on IIS. When I run a batch file using Windows task manager it will run the task one time only. How can I get ->everyMinute

4条回答
  •  情书的邮戳
    2021-02-11 07:04

    I have a single solution Create to file Executable xxx.cmd, Open the file and write the next text.

     @echo off
    
    echo   - = = =   Schedule Run Jobs == = = = -
    
    
    CD d: &&  CD \xampp\htdocs\folderlaravel && php artisan schedule:run
    
    timeout 86400 
    
    CD d: &&  CD \xampp\htdocs\folderlaravel && "Schedule.cmd"
    
    pause
    
    @cls
    

    What you do is run and run itself in an infinite loop depending on what timeout you are given. In this case 86400 => 1 day.

    It is somewhat ambiguous but it works :)

    I hope it works for you.

提交回复
热议问题