I am trying to download flurry exception logs using the following command.
curl --cookie ./flurry.jar -k -L "https://dev.flurry.com/exceptionLogsCsv.do?projectID=49999&versionCut=versionsAll&intervalCut=allTime&direction=1&offset=[0-100:10]" --output "exception#1.csv"
It works fine and it downloads the csv files based on the offset(10,20,30 etc). I would like to insert a delay between each request. Is it possible to do that in CURL?
It is an infinite loop, and the delay is given by the sleep command. The sleep command is not available on Windows. But you can use ping to "emulate" it. Just replace the XX above with the number of seconds you want to delay.
To make a GET request using Curl, run the curl command followed by the target URL. Curl automatically selects the HTTP GET request method unless you use the -X, --request, or -d command-line option.
Using bash shell (Linux) :
while :
do
curl --cookie ./flurry.jar -k -L "https://dev.flurry.com/exceptionLogsCsv.do?projectID=49999&versionCut=versionsAll&intervalCut=allTime&direction=1&offset=[0-100:10]" --output "exception#1.csv"
sleep 5m
done
It is an infinite loop, and the delay is given by the sleep
command.
Edit. On Windows machine, you can do this trick instead :
for /L %i in (0,0,0) do (
curl --cookie ./flurry.jar -k -L "https://dev.flurry.com/exceptionLogsCsv.do?projectID=49999&versionCut=versionsAll&intervalCut=allTime&direction=1&offset=[0-100:10]" --output "exception#1.csv"
ping -n XX 127.0.0.1>NUL
)
The sleep
command is not available on Windows. But you can use ping
to "emulate" it. Just replace the XX above with the number of seconds you want to delay.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With