Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to start download using aria2c everyday at 02:00 am and stop it at 08:00 am.

I know I should use

at 02:00 
at>aria2c ....

I don't know how to tell 'at' to stop it! Actually aria2c stops downloading with Ctrl+C and I don't know how to tell this to 'at'!

And when aria2c starts downloading at the given time, it runs at the backgrounds and I don't know how to stop it manually either!

Any suggestions?

By the way, is there any way to do this automatically? I mean create some sort of scheduled task to do it every day.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

Use pkill to kill a process:

pkill aria2c

Of course, you can schedule the killing with at the same way you do the launch.

share|improve this answer
    
thanks that works fine. but is there a way to tell at to run aria2c at the foreground? –  Firouziam Jul 26 '12 at 7:56
    
Use screen, a text screen manager. To start the program in background: screen -d -m <command>, then use screen -r to reconnect and Ctrl+A D to detach. See manpages.ubuntu.com/manpages/precise/man1/screen.1.html –  Eric Carvalho Jul 26 '12 at 18:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.