I have a site that scrapes quite a bit of data from my university about courses, teachers, etc. It automatically generates schedules for students. (There's a lot of computation on the server)
Monthly, I need to scrape all the data again to see what has updated. The script I have takes about 30 minutes to finish. On my local apache server I can set the execution time to infinity, but on my production server (Digital Ocean, Laravel Forge) that's not a good option -- I get timeout errors from nginx that I haven't been able to resolve.
I know that making the browser wait 30 minutes is never a good solution.
Can I use Laravel jobs to run this script without timeout problems?
Is there some way to run this script in the background with PHP CLI or something?
My current solution is to scrape everything from my local server and then export the DB to my production server. (ugly, I know)
Thank you!