kanotix.com

General Support - I need some help with the 'at' command

vees - 24.08.2006, 15:37 Uhr
Titel: I need some help with the 'at' command
Hi,

I have only dial-up and I want my computer to do a download for me while I am away. I have found that the command 'at' can help me with this, but I have some questions about its usage.

Here is one way I think I could use it:

Zitat:
vs@KanotixBox:~$ at now + 3 hours # arbitrary time to begin queued commands
warning: commands will be executed using /bin/sh
at> pon provider #this connect me to my ISP
at> wget http://www.archive.org/download/dn2006- ... 1_64kb.mp3 #fetches the example file I want
at> poff # disconnects
at> <EOT>
job 17 at Thu Aug 24 13:26:00 2006
vs@KanotixBox:~$


Another way of doing this would be:

Zitat:
vs@KanotixBox:~$ at now + 3 hours
warning: commands will be executed using /bin/sh
at> pon provider && wget http://www.archive.org/download/dn2006- ... 1_64kb.mp3 && poff
at> <EOT>
job 18 at Thu Aug 24 13:29:00 2006
vs@KanotixBox:~$


I tried both of these and in both case the first command ('pon provider') works and connects me but the download does not seem to begin.

My questions are:

1) how can I monitor in real time what part of the at command is being executed? In other words, is there a way I could make at show me the normal progress dialog of wget?

2) am I doing something wrong? is there a difference between the two methods I tried?

Many thanks,

VS
Kano - 24.08.2006, 16:19 Uhr
Titel: RE: I need some help with the
Maybe add a sleep 10 after pon.
schnorrer - 24.08.2006, 16:53 Uhr
Titel: RE: I need some help with the
cronjob at time-xxx

#!bin/sh

pon
sleep 10
wget whatever you want
more commands
poff

more commands

exit;
vees - 24.08.2006, 19:58 Uhr
Titel: RE: I need some help with the
why would a cronjob be preferable to 'at'?
feffer777 - 25.08.2006, 02:07 Uhr
Titel: RE: I need some help with the
My understanding is that "cron" is best for recurring events, and "at" for a one time event. Both should work, though.

Regards,
Ron
Alle Zeiten sind GMT + 1 Stunde
PNphpBB2 © 2003-2007