Cron job to wget page that loads info from Google Sheets
Hello,
I am implementing an app, that needs to check for data in a specific google sheet and am using the the Google's API and some laravel package to do so.
The funcitonality is all there and now am just pondering on how to schedule this to run at specific hours on specific week days every 5 seconds.
What i did (and works) is to add some entries by using crontab -e which do the follwoing:
14,15,16,17,18,19,20 * * 0,3,5 (sleep 15 && wget http://127.0.0.1/blah/task )
.....etc until i hit a minute.
My question is regarding performance, is this a good way to do it? It is just a simple excel sheet with some values (around 100). The users are not many on the web app (around 20) . Would you recommend something different?
@anthonyclark , i lloked into that, but what actually is the benefit of doing it like that instead of crontab? I guess i will handle the sleep in the 'inspire' command correctly? Actually in that command i will have a loop from 0 to 12, with a sleep duration of 5 and the call to the wget command?
@silencebringer , i will look into the package as it seems to do what i need to, without the need to use the sleep workaround for calling it after a specified seconds amount!