Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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 – Eric Carvalho Jul 26 '12 at 18:10

Your Answer


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.