LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-03-2007, 03:48 PM   #1
xav.vijay
LQ Newbie
 
Registered: Jun 2007
Posts: 15

Rep: Reputation: 0
Problem with at command


Hi... I have a problem using 'at' command in PCLinuxOS.
I have collected few links for download & put them on Aria Download manager.

Now if I start Aria anytime, it would naturally resume download from where it had left. I would like to keep my huge downloads in a particular time frame.

So I gave command

at -f /usr/bin/aria -V <time>
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
job 13 at 2007-08-04 01:09

... but this does not seem to stat Aria at the required time.

Any ideas what is happening?????????
 
Old 08-03-2007, 04:14 PM   #2
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
That doesn't appear to be the correct usage of at.

From the at(1) manpages:
Quote:
-f file Reads the job from file rather than standard input.
One option (of several) is for you to create a file /home/you/at-job.sh that contains:
Code:
#!/bin/sh

/usr/bin/aria -V

exit 0
Then run:
at -f /home/you/at-job.sh 23:30
 
Old 08-03-2007, 04:15 PM   #3
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Don't forget to make the script executable.
 
Old 08-03-2007, 04:31 PM   #4
kuitang
Member
 
Registered: Sep 2005
Distribution: Slackware, Ubuntu, OS X
Posts: 58

Rep: Reputation: 15
Aria is a graphical program. The DISPLAY variable is not exported to the shell that at invokes, so aria will complain that there's no X server and quit. Instead of directly starting aria, write a trivial shell script:

#!/bin/sh
export DISPLAY=:0.0
/usr/bin/aria ...

And make sure before at executes it, on your X terminal, type xhost +localhost or else aria will quit with a permission denied error. An alternative is to not use aria or graphical programs but put your urls in a text file and use wget -i FILE. You would put that in a shell script so you can specify which directory wget saves in (cd /path/to/download/files; wget -i LIST).
 
Old 08-03-2007, 04:35 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Good catch. I'm not familiar with aria.

The better answer is to use wget or similar.
 
Old 08-03-2007, 11:02 PM   #6
xav.vijay
LQ Newbie
 
Registered: Jun 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Hmmm... Still doestnt work. Put the commands in a file & made it executable.

Gave the command directly...and get the following error...
at /usr/bin/aria -V 07:58AM
at version 3.1.8
Bug reports to: ig25@rz.uni-karlsruhe.de (Thomas Koenig)
parse error. Last token seen: /
Garbled time

cd /usr/bin
at aria now
parse error. Last token seen: aria
Garbled time

at aria 8.31AM
parse error. Last token seen: aria
Garbled time



I have never used wget before, so thought of giving it a try...worked fantastic...
started download ...resumed download from where it left....exactly the feature I wanted... BUT it didnt work with 'at' command again....

at wget <ftp url> <time> ..... nothing happens....
atq ..... Displayed nothing...
 
Old 08-04-2007, 01:19 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Please carefully read the entire thread again. Refer to the at(1) manpages for proper usage. You can give the at program his commands from stdin or from a file.
 
Old 08-05-2007, 04:32 AM   #8
xav.vijay
LQ Newbie
 
Registered: Jun 2007
Posts: 15

Original Poster
Rep: Reputation: 0
Oops.... Sorry... used the syntax wrong....its working fine now....Thanks..
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A tr command problem baks Programming 10 05-31-2007 08:03 AM
at Command Problem BBPS Linux - Software 2 09-06-2006 06:23 AM
problem with dd command ? MaaSTaaR Linux - General 5 06-25-2006 08:50 AM
problem in cp command ksriram03 Linux - Newbie 2 03-15-2006 12:12 PM
command problem vickr1z Linux - Newbie 3 09-06-2004 01:43 PM


All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration