ihue ihue - 5 months ago 44
Python Question

Best Practice to Make a GET to a certain URL every 5 mins in Laravel

I'm using Laravel.
I'm trying to make a GET to a certain URL (http://localhost/user/check_token)
Every 5 mins.

I'm thinking

But I'm curious if we can achieve this in Laravel itself.

Can we declare a route and make it self executed ? or something like that ?

I'm opening to any suggestions at the moment.

Is my python solution is the best practice for this kind of task ?

Any hints / suggestions on this be much appreciated !


Laravel way is:

  1. Create console command
  2. Run scheduler

Command is just a PHP class, so you can use all power of Laravel in it.