AT command

Hello Friends,

The AT command which we use to schedule one time jobs. How do I see what jobs are submitted to the AT command for any user

Thanks in Advance.

# atq
1 Like
at -l

here

bash#at 04:52 pm
at>  ls -l /etc > /tmp/test.at.txt
at> <CTRL+D>

commands will be executed using /sbin/sh
job 1291125120.a at Tue Nov 30 16:52:00 2010

bash#atq
 Rank     Execution Date     Owner      Job            Queue   Job Name
  1st   Nov 30, 2010 16:52   root       1291125120.a     a     stdin

bash#at -l 1291125120.a
1291125120.a    Tue Nov 30 16:52:00 2010

The "atq" command is available on many versions of Linux but not in mainstream unix.

So you are not counting Solaris as mainstream Unix? :slight_smile:

Solaris lately has become a weird hybrid. For Solaris commands like this you'd need to qualify whether it is the /usr/bin or /usr/xpg4/bin version.
As it was there in SunOS 4.1.3 we would expect continuity.

Strangely the "atq" command is available in Tru64 Unix but not in HP-UX.

It's there in AIX.
It was missing from Dynix.

Looks like I was wrong. The majority wins.

A common fix for portable scripts if "atq" and "atrm" are missing:
alias atq="at -l"
alias atrm="at -r"