Eveything you find in the documentation
How do I schedule some code to run at a specific time?
Hello 👋, I was wondering how can I make some code run when some time comes?
Is there is some kind of a scheduler I can use so that when, let's say, 7 PM comes tomorrow, mark all students who didn't scan the QR code as didnt_attend in the DB?
Also if there are any resources one can read about, that would be awesome
@reviewdevs you can still schedule a console command that runs every minute (or every 10 minutes...whatever) and that command can check the database for sessions that are not marked as attended and whose session end time has finished and the mark it as didnt_attend
Or maybe you could create a Job and queue it just after the Session gets created, scheduling it to be run when the session ends:
https://laravel.com/docs/8.x/queues
https://laravel.com/docs/8.x/queues#delayed-dispatching
although I don't think that's a good approach....as you'll have a lot of Jobs updating the database instead of just one massive update...
Also, I don't know if you can delay the dispatch of a Job by that much, specially after reading this warning:
The Amazon SQS queue service has a maximum delay time of 15 minutes.
Please or to participate in this conversation.