HP-UX System Administrator's Guide: Routine Management Tasks
Scheduling a cron Job
To schedule a job in cron (as root):
1. Run the command: crontab -e root (you can replace root with a different
user name to edit the respective user's crontab file). This will open an editor,
allowing you to create or change crontab entries.
2. Edit the entries as appropriate:
Add an entry; for example,
0 12 * * * tar cv /work /home >/tarlog 2>&1
takes a tar backup of /work and /home every day at noon.
Here’s how this works (the letters under the first five fields of the example are
keyed to the explanations that follow):
0 12 * * * tar cv /work /home 1>/tarlog 2>&1A B C D E
• A = minute
• B = hour
• C = day of the month
• D = month of the year
• E = day of the week (0 = Sunday)
• An asterisk (*) means all legal values, so the asterisks in fields C, D, and E
mean do it every day of the year. Note that standard output and standard
error are redirected to /tarlog.
See “Creating an Automated Backup Schedule” (page 135) for additional information
and examples on how to format cron file entries.
3. When you exit the editor, crontab will automatically copy the entries to the user's
crontab file.
See cron(1M) and crontab(1) for more information.
Adding Users to a Workgroup
This section includes the following topics:
• “Accessing Multiple Systems” (page 144)
• “Sharing Remote Work Directories” (page 145)
• “Local versus Remote Home Directories” (page 145)
• “Adding a User to Several Systems: A Case Study” (page 146)
• “Exporting a Local Home Directory” (page 148)
Accessing Multiple Systems
If a user has an account with the same login on more than one system, (for example, if
the user’s $HOME directory is NFS-mounted from a file server) the UID number should
be the same on all of these systems.
144 Managing Systems