Scheduling jobs, Job scheduling using the at command – HP NonStop G-Series User Manual
Page 143
![background image](/manuals/396692/143/background.png)
MANUALS.RICK /G/ztnt/#pty003e Oct 19 15:12
Note that the who command lists the user name of each user on the system, the system being used,
and the time each user logged on.
The who -u command gives all the information of the who command and also displays the process
ID of each user and the number of hours and minutes there was activity at each workstation. Activity
for less than a minute is indicated by a dot (.).
In the following example, a list of all users currently logged on is displayed:
$ who -u
QADEV.ANDY /G/ztnt/#pty0051 Oct 20 18:17 03:28 684982336
SOFTDEV.ROB /G/ztnt/#pty005l Oct 21 13:22 01:16 903086189
SOFTWARE.REG /G/ztnt/#pty005n Oct 21 14:24 00:05 1070858276
MANUALS.RICK /G/ztnt/#pty003e Oct 19 15:12 07:21 9024
On certain occasions, you may want to have a detailed listing of current processes owned by a
particular user. For example, if you want to get a list of all the processes owned by a user whose
user ID is manuals.rick, enter:
$ ps -fu manuals.rick
UID PID PPID C TTY STIME TIME CMD
MANUALS.RICK 9024 1 - #pty003e Oct 19 15:12 /bin/-sh
MANUALS.RICK 2152 9024 - #pty003e 15:14:25 01:03 ps -fu manuals.rick
Scheduling Jobs
Open System Services provides commands that enable you to control the scheduling of OSS
commands and scripts. The scheduling commands are useful for running jobs that are especially
time-consuming. You can use the scheduling commands to submit jobs to be run at a later time
when system activity is expected to be lower. The job scheduling commands are:
Runs commands at a time that you specify.
at
Runs commands at a time determined by the operating system.
batch
Submits a schedule of commands to the cron demon for execution at a specified time.
crontab
Job Scheduling Using the at Command
The at command requests the execution of one or more OSS commands at a specified time. A
simple form of the at command is:
at time [date] command
where command is an OSS command, and time and date are the time and optional date,
respectively, at which the command is to be executed. If you omit date, the current day is assumed.
For example, the following at command schedules a C compilation to be run at 3 p.m. on the
current date:
$ at 3pm c89 srce.c -o objfile
127448226.a
After you enter an at command, at assigns and displays a job number consisting of nine digits
followed by a period and a single letter indicating the queue the job is assigned to (a is the default
queue). You can use the job number to subsequently cancel or request information about the job.
You can submit multiple commands to at by entering each command on a separate line and
including the EOF character after the last command in the sequence, as in the following example:
$ at 3pm
c89 sfile.c -o bfile
bfile p1 p2 outfile
Scheduling Jobs
143