LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 06-20-2006, 04:02 AM   #1
ikarus
Member
 
Registered: Jun 2005
Distribution: mandrake 10.1
Posts: 97

Rep: Reputation: 15
"at" command not working


Here's a simple one for command line buffs!

I'm using LE2005 and have just discovered a beautiful little scheduler which you can run from the command line. Unfortunately for me it does absolutely nothing:

eg: "at 08:15" takes me to the "at" prompt - fine so far

Now I issue the command to run eg: "skype". I hit enter and then "control d" and it seems to be accepted ( ie no error messages )

However, come 08:15 nothing happens and when I type "atq" in the console, there is apparently nothing in the queue so the system is telling me it has done it.

Could be really handy if only it worked!

IK
 
Old 06-20-2006, 04:14 AM   #2
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
$at 08:15 AM
> your command
^d

$atq

maybe the am/pm thing is coming in your way. just a maybe.
 
Old 06-20-2006, 10:46 AM   #3
ikarus
Member
 
Registered: Jun 2005
Distribution: mandrake 10.1
Posts: 97

Original Poster
Rep: Reputation: 15
Thanks for reply, prozac but no difference. I'm beginning to wonder if there is a dependent service not running but not sure which it is.

IK
 
Old 06-20-2006, 09:49 PM   #4
NoStop
Member
 
Registered: Feb 2005
Location: Canada
Distribution: Debian Etch - Enlightenment E17
Posts: 116

Rep: Reputation: 15
I've not used the at command but looking at its man page, it looks like the time should be entered like:

8:15am

Also, I'm wondering if running as root could be a dangerous way to run Skype? Maybe you should setup the at command to accept a regular user to use that command as outlined in the man page.


Cheers.
 
Old 06-20-2006, 10:17 PM   #5
ikarus
Member
 
Registered: Jun 2005
Distribution: mandrake 10.1
Posts: 97

Original Poster
Rep: Reputation: 15
thanks for your reply nonstop

yes have also tried your way and run as root or other user. Skype was not a good example I must admit, but have tried many other simple commands. Reading up a bit more on this I noticed that there should be a file: /var/at/at.conf or similar. I cant find one in this installation. It seems that this would define the users who could use "at" and the default is root of course.
I'm still not sure which service needs to be running. Possibly its "crond" but not sure.

IK
 
Old 06-20-2006, 10:38 PM   #6
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
the atd daemon handles running at commands at specified times AFAIK and i don't know of any service that at depends upon.

#from man pages
The superuser may use these commands in any case. For other users, permission to use at is determined
by the files /etc/at.allow and /etc/at.deny.

If the file /etc/at.allow exists, only usernames mentioned in it are allowed to use at.

If /etc/at.allow does not exist, /etc/at.deny is checked, every username not mentioned in it is then
allowed to use at.

If neither exists, only the superuser is allowed use of at.

An empty /etc/at.deny means that every user is allowed use these commands, this is the default configu-
ration.

Last edited by prozac; 06-20-2006 at 10:41 PM.
 
Old 06-22-2006, 03:56 AM   #7
ikarus
Member
 
Registered: Jun 2005
Distribution: mandrake 10.1
Posts: 97

Original Poster
Rep: Reputation: 15
thanks for info prozac. I checked that atf is running in MCC and all seems to be well. I have a file - /etc/at.deny which is empty. Here is the feedback I get after typing "at 13:00 (return )"

warning: commands will be executed using (in order) a) $SHELL b) login shell c)/bin/sh

Does this ring any bells with you?

IK
 
Old 06-22-2006, 04:08 AM   #8
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
nope. the warning is the same for you and me yet my commands get executed nicely.
Code:
root@test:~# date
Quote:
Thu Jun 22 14:44:46 NPT 2006
Code:
root@test:~# at 14:46
Quote:
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> /etc/rc.d/rc.firewall
at> <EOT>
job 1 at 2006-06-22 14:46
Code:
root@test:~# atq
Quote:
1 2006-06-22 14:46 a root
after sometime..

[code]root@test:/etc# date[code]
Quote:
Thu Jun 22 14:50:08 NPT 2006
Code:
root@test:/etc# atq
Quote:
root@test:/etc#
I honestly don't know whats going on with your system there.
maybe try and re-install atd or use cron.
 
Old 06-22-2006, 05:38 AM   #9
ikarus
Member
 
Registered: Jun 2005
Distribution: mandrake 10.1
Posts: 97

Original Poster
Rep: Reputation: 15
Hi prozac - well Ive just tried again on a differnet machine running PCLinuxOS and I get exactly the same problem ie nothing. I shall now type in your example word for word and try that!

IK
 
Old 06-22-2006, 06:41 AM   #10
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
try and run something that writes to a file for example
Code:
echo "at ran this command successfully!" > /home/user/at.txt
and check the at.txt file after you think the time has past. it will tell us where the problem exactly is, in at or our understanding.
also make sure atd is running.

Code:
/etc/init.d/atd status
 
Old 06-22-2006, 11:22 PM   #11
ikarus
Member
 
Registered: Jun 2005
Distribution: mandrake 10.1
Posts: 97

Original Poster
Rep: Reputation: 15
prozac - yes you are right! that's perfect. I was naive in asuming that a command output would appear automatically in the current terminal window. However, what I was hoping to do was execute various apps at specific times of day (eg KMAIL) If the app has a GUI and will run from the command line, I would have expected that to work fine. I've even tried to use the GUI version of cron - Kcron but Ive had no success with that either. Am I being a total "thicky" here?

IK
 
Old 06-22-2006, 11:34 PM   #12
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
Quote:
Originally Posted by ikarus
Am I being a total "thicky" here?
might be. just kiddin'
 
  


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
"service __ restart" bash command isn't working case1984 Linux - Newbie 9 04-10-2008 02:35 PM
executables and "make" command not working blahboybang Linux - General 5 12-24-2004 07:57 PM
rpm -bp command not working says "-bp: unknown option" Niceman2005 Linux - Software 2 11-08-2004 01:36 AM
KDE's "Run Command" not working for URLs scarr2508 Linux - Newbie 0 10-28-2004 04:58 AM
Slackware 8.1: "installpkg" command not working? tigerflag Slackware 5 10-12-2002 02:44 PM

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

All times are GMT -5. The time now is 10:54 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
Open Source Consulting | Domain Registration