When downloading big files it necessary to pause the download many times. A big file can be downloaded by using
wget. First start download, then kill
wget, then resume download by
I want to pause downloads too many times depending on events such as power failure, Network unavailability, etc... and want to automate it using a script. So pressing Ctrl+C is't an option. I know a process can be paused by
kill -STOP "$pid" The pausing should not close the connection to the website, either it should wait for resume command or the bandwidth throttled to very low use.
I found these commands using
aria2c in aria2.sourceforge.net, but I can't use it successfully. This uses RPC method. Can I use it in a script?
This method pauses the download denoted by gid. gid is of type string. The status of paused download becomes paused. If the download is active, the download is placed on the first position of waiting queue. As long as the status is paused, the download is not started. To change status to waiting, use aria2.unpause() method. This method returns GID of paused download.
This method changes the status of the download denoted by gid from paused to waiting. This makes the download eligible to restart. gid is of type string. This method returns GID of unpaused download.
- How to pause (or throttle bandwidth) an already running download of aria
- Is there a better down loader than
ariato use in script
- Wether RPC method can be used in script