On 19/10/11 13:54, Darac Marjal wrote:
On Wed, Oct 19, 2011 at 02:45:20PM +0200, Bonno Bloksma wrote:
Hi,

Using Debian Lenny I want to restart my dhcp server tonight at 7pm using the at 
command so I enter:
at 7pm /etc/init.d/dhcp3-server restart
and get
syntax error. last token seen: /
The same for
at 7pm "/etc/init.d/dhcp3-server restart"

So how am I supposed to enter this command? What am I doing wrong?

Though it's not obvious from "at -h", the correct method to use at is to
invoke it simply at "at 7pm". You will then be given an "at>" prompt
inviting you to type in a script which will be run.

So, to be clear enter "at 7pm", then press return to get the prompt. Now
type "/etc/init.d/dhcp3-server restart" and press resturn. Finally,
press Ctrl+D to terminate your input. At should now confirm when your
job will be run and give you a job number. Expect your output in the
post (that is, any output from the job will be emailed to you).

Also, you can do

echo "/etc/init.d/dhcp3-server restart" | at 7pm

--
Dom


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4e9ed84e.2060...@rpdom.net

Reply via email to