windows - Laravel queues in Azure server -


i'm struggling issue, little frustrating me because seems simple in linux server. have windows azure web app , want run "php artisan queue:listen" on server continuously take care of dispatched jobs. read documentation, in linux use supervisor run command , revive it, in case dies. found online, azure has similar functionality called webjobs can serve them script ran , decide whether should run on schedule or continuously (kinda scheduler in laravel). have 2 questions.

  • 1 - right solution? place script run command on webjob , have webjob run continuously?
  • 2 - i'm not experienced in writing php scripts run command lines, can this:

echo shell_exec('php artisan queue:work');

problem not give me output of command (i don't see "processed" result see when run command hand on command console , job processed). important me able read output of command, because want able check logs errors in case happens when job isn't able processed. documentation shell_exec returns null in case error thrown i'm clueless on how deal this.

thank in advance!

instead of using shell_exec() can directly upload .cmd file includes command php artisan queue:work, , can find output log in webjob details page.

about how that, please check ernesto's answer out.

for azure can make new webjob web app, , upload .cmd file including command this.

php %home%\site\wwwroot\artisan queue:work --daemon

and defining triguered , 0 * * * * * frecuency cron.

that way work me.

for more information, please refer run background tasks webjobs.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -