ihue ihue - 1 year ago 84
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 !

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download