webui-aria2 icon indicating copy to clipboard operation
webui-aria2 copied to clipboard

Schedule download at particular time

Open halida opened this issue 10 years ago • 7 comments

I'd like to start/stop downloading at some particular time, like download only at 0:00-6:00, Is there any way I can do this?

halida avatar Jan 13 '15 09:01 halida

+1 to this. Even without the functionality in aria2 natively - you could do this via rpc start/pause calls triggered using JS to schedule.

mfallu avatar May 22 '15 12:05 mfallu

Aria pause

#!/bin/sh

curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc": "2.0","id":1, "method": "aria2.pauseAll", "params":[]}'

exit 0

Aria unpause

#!/bin/sh

curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc": "2.0","id":1, "method": "aria2.unpauseAll", "params":[]}'

exit 0

Just use cron.

darzur avatar May 22 '15 15:05 darzur

Thanks @darzur for this greatly helpful comment. although since im not familiar with JSON i had hard time figuring out how to send commands for limiting speed on secret token enabled Aria2.

as he said you can put these commands in cron to get executed at favorite time.

Here are the commands (a bit more noob friendly version):

For pausing all downloads:

curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc": "2.0","id":1, "method": "aria2.pauseAll", "params":["token:MySuperTopSecret"]}'

For resuming all downloads:

curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc": "2.0","id":1, "method": "aria2.unpauseAll", "params":["token:MySuperTopSecret"]}'

For limiting total download speed:

curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc": "2.0","id":1, "method": "aria2.changeGlobalOption", "params":["token:MySuperTopSecret",{"max-overall-download-limit":"5k"}]}'

For unlimiting total download speed:

curl http://127.0.0.1:6800/jsonrpc -H "Content-Type: application/json" -H "Accept: application/json" --data '{"jsonrpc": "2.0","id":1, "method": "aria2.changeGlobalOption", "params":["token:MySuperTopSecret",{"max-overall-download-limit":"0"}]}'

euphoria360 avatar Jan 18 '16 20:01 euphoria360

Thanks for the curl sample commands, Can't we add a UI element to webui to make it easy for users?

tmkasun avatar Nov 30 '16 06:11 tmkasun

does anybody know how to do this in the CLI version?

saleh-old avatar May 07 '20 15:05 saleh-old

@saleh-mir This is only about CLI, no GUI involved.

no1xsyzy avatar May 08 '20 10:05 no1xsyzy

@no1xsyzy I meant I have only aria2 installed, and not webui-aria2. Because I see in the curl command that it's sending request to http://127.0.0.1:6800 which I assume is for this webui-aria2 repo.

saleh-old avatar May 08 '20 10:05 saleh-old