We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

at command

doron123
doron123 asked
on
Medium Priority
463 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.
Comment
Watch Question

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
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)

Author

Commented:
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 ?

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

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

Author

Commented:
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
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
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

Author

Commented:
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?

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
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 /

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
BTW, what version of unix are you using, and who configured it?

Author

Commented:
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 / .



ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
Ok, where is your at? if it's /usr/bin/at try
strings /usr/bin/at

Author

Commented:
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
....

Author

Commented:
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.

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
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

Author

Commented:
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)"
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
$<

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
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?

Author

Commented:
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!!!.

Author

Commented:
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 ?

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

Author

Commented:
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.

Author

Commented:
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.
Check out if root's crontab executes "atrun"

-Eric.

Author

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

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.

Author

Commented:
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.
My mistake wrong system .... checkout to see that cron is runing & functioning (put something in the crontab and see if it works).

Author

Commented:
How to write there ... i mean what to write there and how to check that it works..?
1) Do "crontab -e root" to edit
2) add this "10 * * * * touch /tmp/xxxx" it will change the file date every 10 minutes.

-Eric.

Author

Commented:
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...

Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.