Created
February 24, 2015 15:33
-
-
Save didasy/621504bfa94bf62304c7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This use wget to download the file with: | |
# infinite retries | |
# keep retrying even when there is no connection | |
# wait 3s between retries | |
# continue from last point if failed and there is a file named test.file in the target directory | |
# with limited bandwidth rate of 2 000 000 Bytes/s | |
# and put the file to the path/filename | |
wget -t 0 --retry-connrefused --waitretry=3s -c --limit-rate=2000000 --output-document=~/Downloads/test.file http://localhost/file/test.file | |
# If you want to stop retrying, say after 100 times, put "-t 100" instead of "-t 0" | |
# If it failed after 100th retries, the plan is you could save this command as failed download to a database, | |
# then possibly run a sweeper for failed downloads that ran every N minutes and retry it with the same command |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment