LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-04-2006, 05:38 PM   #1
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Rep: Reputation: 30
'at' command not working


hi, fellows
yes, I know it's a 'common' issue, coz I was searching and found some posts about this problem, but still can't make it work.
what I do is this:
Code:
$ at 1957
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> echo "hello"
at> <EOT>
inmediatly after that:
Code:
~$ at -l
9       2006-03-04 19:57 a jp
..but at 19.57 nothing happens at all, then I do at -l again, and the job has gone (think it's normal).

I listed the running processes and get this 2 lines:
Code:
 3965 root      16   0  1676   628   536 S  0.0  0.3  0:00.00 /usr/sbin/crond -l10
 3967 root      16   0  1680   692   592 S  0.0  0.3  0:00.00 /usr/sbin/atd -b 15 -l 1
..so I guess that services are working, but don't know what thats numbers after the services means.
The at.allow file doesn't exist, and the at.deny is empty.
As root, 'at' cmd doesn't work either, and no single mention to 'at' in /var/log/messages.
What should I do to get it working?
Thanks in advance,
 
Old 03-04-2006, 05:55 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
I don't use at - but it looks like you need to specify where to direct the output of the command. Does echo "hello" > /tmp/hello.log work? The man page on my system says that stdout and stderr will be emailed to the user via /usr/sbin/sendmail - is that where your sendmail is?

Last edited by gilead; 03-04-2006 at 05:58 PM.
 
Old 03-04-2006, 06:23 PM   #3
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
thanks 4 answer..
well, your recipe has worked, but still can't make 'at' just pop me a message. What I did was made a script containing echo "hello", and made it executable... but 'at' doesn't trigger it, or if it do so, there's no stdout at all.
any idea?
 
Old 03-04-2006, 06:25 PM   #4
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
sorry, just now I re-read your post, and the mail issue...but I don't have the sendmail (and it daemon) enabled, coz I don't use it.
so, do U know If there's any way to make messages go out thru the screen? -not emailed.
 
Old 03-04-2006, 06:32 PM   #5
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
It's possible that someone else will know how to do this. From what I've seen though, at (like cron) assumes that stdout can't be guaranteed to point to a console so it diverts it internally.

I haven't tried anything like the following, but that's where stdout usually points:
Code:
echo "hello" >/dev/fd/1
Or,
echo "hello" >/dev/pts/2
That's fd/1, not fd1 - and the pts/2 would have to be modified for whatever your using

Last edited by gilead; 03-04-2006 at 06:47 PM.
 
Old 03-04-2006, 07:11 PM   #6
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
sorry about the delay.. I'm makin also some google just to find out how it works.
its seems that 'at' wasn't made to put messages thru stdout.
traying to use your recipe:
echo "hello" >/dev/fd/1
Or,
echo "hello" >/dev/pts/2
..would U pelase tell me how to find out which device is my actual terminal? -I boot at runlevel 3 (text-mode), and then I startX and open a terminal, so, in fact there's 2 terminals: the one from X was launched, and the actual graphical one.
Thanks again 4 helping
 
Old 03-04-2006, 07:17 PM   #7
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
btw: do U know any text-mode app which just pops messages thru stdout? -a sort of simple schedule. thanks.
 
Old 03-04-2006, 07:25 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The quickest way to find out where stdout is pointing to is to follow the links in /dev. For example:
Code:
$ ls -l /dev/stdout
lrwxrwxrwx 1 root root 4 2006-01-10 08:36 /dev/stdout -> fd/1
$ ls -l /dev/fd/1
lrwx------ 1 steve steve 64 2006-03-05 11:20 /dev/fd/1 -> /dev/pts/2
$ ls -l /dev/pts/2
crwx------ 1 steve tty 136, 2 2006-03-05 11:21 /dev/pts/2
Sorry, but I don't know of any schedulers that write to the console. Are you sure you're going to be logged in when the job runs? If so, can you let the job write to a log file and have a separate console open that is using tail to watch the file:
Code:
tail -f /tmp/hello.log
 
Old 03-04-2006, 07:49 PM   #9
minike
Member
 
Registered: Aug 2004
Location: Argentina
Distribution: slackware 12
Posts: 211

Original Poster
Rep: Reputation: 30
nopes... it doesn't work.
when I simply do:
$ echo "hello" > /dev/stdout
..the string is displayed in the actual console.
..but same thing thru 'at' doesn't work, I mean:

$ at now + 2 min
AT> echo "hello"
AT> [EOT]

doesn't display the string.. neither this way:

$ at now + 2 min
AT> script_containing_echo_"hello"_cmd.
AT> [EOT]

..so, guess I give up.
very thanks 4 your help.
 
Old 03-04-2006, 07:59 PM   #10
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Yep, it looks like the only way to monitor the output on a console is to use something like the following:
Code:
$ touch /tmp/hello.log
$ at now + 2 min
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> echo "hello" >> /tmp/hello.log
at> <EOT>
job 3 at 2006-03-05 11:58
$ tail -f /tmp/hello.log
hello
 
  


Reply



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
can't capture 'at' command standard output to a file bartoni Linux - General 3 02-28-2006 03:52 PM
scheduling problem using 'at' medmedia Linux - Software 7 12-05-2005 04:10 AM
'at' command "Cannot open display" Gregory Deal Linux - Software 2 09-30-2004 08:06 PM
Can't access the 'at' symbol nedbenj Linux - Software 2 06-15-2004 10:07 AM
use 'at' to run x apps? florestan Linux - Software 6 04-14-2003 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:11 AM.

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
Open Source Consulting | Domain Registration