Can I view an 'at' command?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Can I view an 'at' command?
# 1  
Old 12-02-2011
Can I view an 'at' command?

Hi,

One of our users has loads of jobs scheduled. When I do at -l I get a long list of tasks which end in .a
Is there anyway I can view what these commands will do? Also, What's the relationship between the 'at' function and the crontab? I can't see any entries in crontab....Cheers
# 2  
Old 12-02-2011
Check your man page for at - the directories it uses should be listed. On Linux the jobfiles are usually in /var/spool/at.
This User Gave Thanks to CarloM For This Post:
# 3  
Old 12-02-2011
And on HPUX you would find them in /var/spool/cron/atjobs if correctly formulated (jobs syntax used...) otherwise in /var/spool/cron... the atjobs files are readable...
This User Gave Thanks to vbe For This Post:
# 4  
Old 12-02-2011
cron and at are separete commands.(and cron runs with a different enviroment (/etc/crontab))
usually the at cmd, used one times jobs,for exa (test a script at specific times and see what happened)
if it's succesfull that your scheduled job,you can think it as a cron jobs for repeated times.

regards
ygemici
This User Gave Thanks to ygemici For This Post:
# 5  
Old 12-02-2011
Something that might interest you:
Code:
ant:/home/vbe $ at -f /home/vbe/test_at_cmd now+7minutes
warning: commands will be executed using /usr/bin/sh
job 1322836280.a at Fri Dec  2 15:31:20 2011
ant:/home/vbe $ cd /var/spool/cron/atjobs
ant:/var/spool/cron/atjobs $ ll
total 12
-r-Sr-Sr--   1 vbe        bin           6029 Dec  2 15:24 1322836280.a
ant:/var/spool/cron/atjobs $ cd ..
ant:/var/spool/cron $ ll
total 4
-r-Sr-Sr--   1 vbe        bin              0 Dec  2 13:41 _at24347        # these are bad ones...and so dont  
-r-Sr-Sr--   1 vbe        bin              0 Dec  2 13:44 _at24391        # finish in atjobs it seems....
dr-xr-xr-x   2 bin        bin             96 Dec  2 15:24 atjobs
-r--r--r--   1 bin        bin            335 Nov 14  2000 crontab.root
dr-xr-xr-x   2 bin        bin           1024 May 31  2010 crontabs
drwxr-xr-x   2 root       sys             96 Jun 24  2009 save
drwxrwxrwt   2 root       root            96 Dec  2 15:25 tmp

--

ant:/home/vbe $ jobs
[2] + Stopped (tty input)      nohup at now+2minutes ./test_at_cmd&
[1] - Stopped (tty input)      at now+5minutes ./test_at_cmd&

ant:/var/spool/cron/atjobs $ more 1322836280.a
: at job
export LANG; LANG=C
export _; _=/usr/bin/at
export MANPATH; MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/us
r/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/upgrade/share/man/%L:/opt/up
grade/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/pd/share/man/%L:/opt
/pd/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/opt/ignite/share/man/%L:/o
pt/ignite/share/man:/opt/mx/share/man:/usr/dt/share/man:/opt/samba/man:/opt/perf
/man/%L:/opt/perf/man:/opt/OV/man/itose/%L:/opt/OV/man/itose:/opt/prm/man/%L:/op
etc...
export EDITOR; EDITOR=vi
export HISTFILE; HISTFILE=/home/vbe/.sh_history
export LOGNAME; LOGNAME=vbe
export MAIL; MAIL=/var/mail/vbe
export MOZILLA_HOME; MOZILLA_HOME=/opt/mozilla
export USER; USER=vbe
export XFORCE_INTERNET; XFORCE_INTERNET=True
export SHELL; SHELL=/usr/bin/ksh
export HISTSIZE; HISTSIZE=18432
export TMOUT; TMOUT=0
export HOME; HOME=/home/vbe
export A__z; A__z=-5TMOUT
# @(#)B.11.11_LR
cd /home/vbe
ulimit unlimited
umask 2
#!/usr/bin/ksh
HOME=/home/vbe

cd $HOME
echo "PWD "$PWD >$HOME/at_test.out
. $HOME/profile_cron
/usr/bin/touch $HOME/at_test.out
echo "Im " $(id) >&1
/usr/bin/umask >&1
/usr/bin/newgrp >&1
echo "Im " $(id) >&1

1322836280.a: END
----

ant:/var/spool/cron/atjobs $ date;ll
Fri Dec  2 15:31:54 MET 2011
total 0
ant:/home/vbe $ date;jobs
Fri Dec  2 15:32:21 MET 2011
[2] + Stopped (tty input)      nohup at now+2minutes ./test_at_cmd&
[1] - Stopped (tty input)      at now+5minutes ./test_at_cmd&

So it may be what you see are unsuccessful attempt at trying to use at...
Needs cleaning (and I have also now...)
In my case its simple:
Code:
ant:/home/vbe $ date;jobs
Fri Dec  2 15:32:21 MET 2011
[2] + Stopped (tty input)      nohup at now+2minutes ./test_at_cmd&
[1] - Stopped (tty input)      at now+5minutes ./test_at_cmd&
ant:/home/vbe $ fg
nohup at now+2minutes ./test_at_cmd
                                                                    # Did a Ctrl-c
you have mail in /var/mail/vbe
ant:/home/vbe $ jobs
[1] + Stopped (tty input)      at now+5minutes ./test_at_cmd&
ant:/home/vbe $ fg
at now+5minutes ./test_at_cmd
                                                                   # Did a Ctrl-c
ant:/home/vbe $ jobs
ant:/home/vbe $


Last edited by vbe; 12-02-2011 at 10:49 AM.. Reason: Cant get rid of vi mania... Why is this editor not vi anyway?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Command to View Processor Usage

Hi everyone, i used to know the command to show current CPU usage but i cannot remember it. It was not "Top". Openserver 6. (4 Replies)
Discussion started by: Paulbas
4 Replies

2. Shell Programming and Scripting

Need to view command in history for specific date

hi i want to find a command in history for specific date . is it possible that i can view ?? (1 Reply)
Discussion started by: scriptor
1 Replies

3. AIX

Help Please - Command to view missing filesets in aix

Please anyone tell me "What is the command to view missing filesets in aix" Thanks in advance ---------- Post updated at 09:34 PM ---------- Previous update was at 05:09 PM ---------- Please anyone tell me "What is the command to view missing filesets in aix" Thanks in advance (3 Replies)
Discussion started by: sweetysiva29
3 Replies

4. Shell Programming and Scripting

Command to view files in Directory

Hi, Can u provide me the command to view files in a directory.Urgent Pls. -Vamsi (4 Replies)
Discussion started by: VamsiVasili
4 Replies

5. Shell Programming and Scripting

Command to view files in Directory

Hi, Can you help me in providing me a command to view all files present in a directory. Thanks a lot. -Vamsi (1 Reply)
Discussion started by: VamsiVasili
1 Replies

6. Shell Programming and Scripting

Command to view folder subfolder and its capacity

Can any one tell how to view folder and subfolder with its capacity df -k will cannot be used it shows only the parent folder while du -k will show all subfolder and files but not show the capacity and also i dont want view any files Thank you!!!! (1 Reply)
Discussion started by: shivu
1 Replies

7. Solaris

command to view the haware detail

I use command #lscfg -v in AIX system and it gives the detail of the hardware of the system. what is the similar command to view the detail of the hardware of the system in SUN-Solaris (3 Replies)
Discussion started by: pchangba1
3 Replies

8. HP-UX

View command was typed

Hello All, I Am A New Member To This Group. Could you show me how to view all command was typed the same Redhat. Every I type arrow up and down to show the command was type but nothing to see. I must type it again. it is very slow. Thanks hoavn (4 Replies)
Discussion started by: hoavn
4 Replies

9. UNIX for Dummies Questions & Answers

command to view ports being used

Is there a command that will show me all ports being used? I thought maybe the "lsof" command would show me, but I'm not seeing anything. Thanks, Jeff (2 Replies)
Discussion started by: lawadm1
2 Replies

10. UNIX for Dummies Questions & Answers

view page command?

Hi All, When I run a command on any shell, many times the output is longer than the screen can hold, so I only can see parts of the output. Is there a command that will show me page by page the results of each command? Thanks, Jared (3 Replies)
Discussion started by: JaredsNew
3 Replies
Login or Register to Ask a Question