LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 12-08-2011, 04:25 AM   #1
kuldeep
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Rep: Reputation: Disabled
how to use 'at' command


i have a one file ./query.sh which i wanted to run on a specified time via using 'at' command but its not giving me any respond. any idea for the same so please tell me.
 
Old 12-08-2011, 05:27 AM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Well could you tell us what you did so far, and how you configured it to run?
 
Old 12-13-2011, 05:33 AM   #3
kuldeep
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hi corp769,


I used at +time +filename then ctrl+d then i got a job number.
but on the certain time period the given task was not schedule.
 
Old 12-13-2011, 05:52 AM   #4
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
using a RHEL system, the following is the syntax I use:
Quote:
at 06:50 -f ~/file.to.run.sh
make sure your script has the relevant path and env. variable to run it.
Look at
Quote:
man at
for further information.
 
Old 12-13-2011, 05:55 AM   #5
kuldeep
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
Hi zQUEZ,
thanks for your update but i did the same.
later i found that i haven't permission for this eventhough i tried same with sudo command but the result same. Do you have any idea how could i run it?
 
Old 12-13-2011, 05:57 AM   #6
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
how do you know you don't have permissions?
Do you have an /etc/at.deny and/or /etc/at.allow defined? If so, why not use your sudo rights to modify that?
Do you have sudo rights?
 
Old 12-13-2011, 06:00 AM   #7
kuldeep
LQ Newbie
 
Registered: Jul 2011
Posts: 7

Original Poster
Rep: Reputation: Disabled
zQUEz,

There is no such type of the file i'd found. I read from man command if i haven't such type of the file at.allow or at.deny then i can run this command or haven't the permission for the same.
But thanks for your co-operation.
 
Old 12-13-2011, 06:38 AM   #8
zQUEz
Member
 
Registered: Jun 2007
Distribution: Fedora, RHEL, Centos
Posts: 294

Rep: Reputation: 54
If you don't have permission to use at, you should get the following when you try and queue a command:
Quote:
You do not have permission to use at.
Is your "atd" service running? if it wasn't, you should get the following when you try and queue a command:
Quote:
Can't open /var/run/atd.pid to signal atd. No atd running?
What does the command `atq` return?
What is the actual `at` command you are typing at the command line?
 
  


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
Bash Command Line Editor, while typing run another command before executing current? gumaheru Linux - General 5 04-13-2010 11:21 AM
how to copy drive using dd and tee command parallely? source code of dd command mdfakkeer Linux - Software 1 02-10-2010 01:31 PM
URGENT! Is there any command to get a history command lines and time in SUSE Linux.? igsoper Linux - Software 5 06-25-2009 02:14 AM
LXer: The Linux Command Shell For Beginners: Fear Not The Command Line! LXer Syndicated Linux News 0 12-22-2008 06:30 PM
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:00 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