Solved

at command

Posted on 1997-10-12
29
395 Views
Last Modified: 2010-04-21
when trying to use thee "at" command i get :
"cant create a job":not a directory.
 
i built a at.allow file in the /var/spool/cron location and i can use it ,but i can't operate it ..
i use "at 12:00 date" for example or anyting else and i get the same massage ,what should i do in order to use it.
0
Comment
Question by:doron123
  • 16
  • 7
  • 6
29 Comments
 
LVL 84

Expert Comment

by:ozo
ID: 2007357
Can you `echo date | at 12:00`?
Is there a /var/spool/cron/atjobs directory?
What do you mean you can use it, but can't operate it?
(and I'd have expected at.allow to go in /var/adm/cron/ or /usr/lib/cron,
although it doesn't sound like that's your problem)
0
 

Author Comment

by:doron123
ID: 2007358
i didn't have the "atjobs" lib/directory .
i created it and now i get a new massage : "can't open prototype file for queue:no such file or directory".
i tried several commands (date and emacs ect') ,i  get the same error for all of them ,and i ran them manulay (emacs ,date ect) ,and they work .. what could it be ?

0
 
LVL 84

Expert Comment

by:ozo
ID: 2007359
Does
man at
tell you anything?
In the same directory as at.allow there may be a .proto file
prepended to all jobs
0
 

Author Comment

by:doron123
ID: 2007360
yes ,when writing man at i get the help file ,and i did anything it saied ,including building the at.allow and deny files .
...and i don't have any .proto file what is this file suppose to be ? ,should i build it ,if so could you tell me please how?

thanks ahead:
-----------------
Doron Amedey
doron-a@vectronics.co.il
FAE
0
 
LVL 84

Expert Comment

by:ozo
ID: 2007361
Was there a section near the end labled
FILES
which told you where the spool area, and at.deny are?
If so, did it mention any prototype files?
Can you see any filenames if you do
strings `which at` | grep proto

0
 

Author Comment

by:doron123
ID: 2007362
no i don't have the FILES ... and i get nothing when writing `which at` | grep proto ,and i don't have the proto file ,what are they should i build them ... how?

0
 
LVL 84

Expert Comment

by:ozo
ID: 2007363
that's "strings `which at` | grep proto"
If you see nothing at all, then I don't see how at could have
printed "can't open prototype file for queue"
how about
strings `which at` | grep /

0
 
LVL 84

Expert Comment

by:ozo
ID: 2007364
BTW, what version of unix are you using, and who configured it?
0
 

Author Comment

by:doron123
ID: 2007365
sorry sorry sorry ,when writing strings `which at` | grep proto  i get "which at:no such file or directory" ,and the same when writing strings `which at` | grep / .



0
 
LVL 84

Expert Comment

by:ozo
ID: 2007366
Ok, where is your at? if it's /usr/bin/at try
strings /usr/bin/at
0
 

Author Comment

by:doron123
ID: 2007367
ok ,my at is at the /bin/at ,when wrinting strings /bin/at i get alot of text when i did more i got ... you are not a valid user
at.allow
at.deny
at:invalid job names


and at the /var/spool/cron/atjobs
can't create a job for you
can't change the owner of your job to you
can't creat a job for you

.proto
can't create a job for you
job disappeared -couldn't stat
....

0
 

Author Comment

by:doron123
ID: 2007368
i use the os 4.1.4 ,it was originaly configurated by some company we stoped working with and now its up to me here.

0
 
LVL 84

Expert Comment

by:ozo
ID: 2007369
4.1.4 doesn't tell me a lot, does
uname -a
tell you anything?
With insufficient information from man at, and no one who knows the configuration,
I'm sort of trying to reverse engineer your /bin/at to find where it's files are
Does
strings /bin/at | grep /
show any interesting looking directorys?
Does "man cron" show any FILES section?
Otherwise, we could just start guessing places like
/var/adm/cron/.proto
/usr/lib/cron/.proto
/etc/cron.d/.proto
0
 

Author Comment

by:doron123
ID: 2007370
SunOs 4.1.4 as i said that what i get when writing uname -a.
when writing "strings /bin/at | grep / " i get
you are not a valid user (no entry in /etc/passwd)"
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Accepted Solution

by:
EricKaplan earned 20 total points
ID: 2007371
Put the following in /var/spool/cron/.proto
-Eric.
---cut here-----cut here-------------------------
#
# @(#).proto 1.3 88/02/08 SMI; from S5R3 1.1
#
cd $d
umask $m
$<

0
 

Author Comment

by:doron123
ID: 2007372
after writing the .proto i get when writing "at 20:00 emacs" (for example) :
at:emacs:no such file or directory

which is a different remark than the last ones ...
what should i do now?

0
 

Author Comment

by:doron123
ID: 2007373
stop stop stop!!! ,it works .. istead of writing "at 20:00 emacs" ,i should have writen the full path "at 20:00 /bin/date" for example .
can you tell me how istead of writing the full path (which is long and ... ) ,where can i define that when i write emacs it refers to emacs path (as on my path (alias) ,in the .cshrc).

thank you thank you thank you very much!!!.

0
 

Author Comment

by:doron123
ID: 2007374
after trying it ..well i got the date massage ,but with the following :"can't open queuedefs file /user/llib/cron/queuedefs:no such file or directory"

what is this file/dir ,should i create it /how ?

0
 
LVL 3

Expert Comment

by:EricKaplan
ID: 2007375
This is what I have in /var/spool/cron/queuedefs
It seems to me that your OS installation was not complete

#
# @(#)queuedefs 1.2 88/02/08 SMI; from S5R3
#
a.4j1n
b.2j2n90w
0
 

Author Comment

by:doron123
ID: 2007376
thanks it works now!!!

one thing more ... couls you please refer to my note about the shourtcuts ....
"where can i define that when i write emacs it refers to emacs path (as on my path (alias) ,in the .cshrc).
...?" ? thanks.

0
 

Author Comment

by:doron123
ID: 2007377
well I'm back...
after writing at <time> <task> ,i get
job <number> at <time to be executed>.

but nothing happens...
can you help me on this please.
0
 
LVL 3

Expert Comment

by:EricKaplan
ID: 2007378
Check out if root's crontab executes "atrun"

-Eric.
0
 

Author Comment

by:doron123
ID: 2007379
where should it be in .. i don't have it ("atrun") at /bin and not at the /var/spool ...

0
 
LVL 3

Expert Comment

by:EricKaplan
ID: 2007380
1) "su" to root
2) "crontab -l root"

one of the lines should contain an "atrun" command (every 5 min.)

Another possibility is that cron is not executing so check that as well.

-Eric.
0
 

Author Comment

by:doron123
ID: 2007381
when writing (as root) the crontab -l root i get :
04**0 /usr/local/vision/bin/visionfs checkpoint 1>/dev/null 2>/dev/console

and i don't see the atrun there.
what should i do ?

how do i add points to the q.
0
 
LVL 3

Expert Comment

by:EricKaplan
ID: 2007382
My mistake wrong system .... checkout to see that cron is runing & functioning (put something in the crontab and see if it works).
0
 

Author Comment

by:doron123
ID: 2007383
How to write there ... i mean what to write there and how to check that it works..?
0
 
LVL 3

Expert Comment

by:EricKaplan
ID: 2007384
1) Do "crontab -e root" to edit
2) add this "10 * * * * touch /tmp/xxxx" it will change the file date every 10 minutes.

-Eric.
0
 

Author Comment

by:doron123
ID: 2007385
how do i edit it ,in the file there is one line there "04**0 /usr/local/vision/bin/visionfs checkpoint 1>/dev/null 2>/dev/console "
how do i add an other line ,edit ,save and delete char if i made any mistake ,i tried to open it with the emacs but it didn't let me do so...

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now