Scheduling Jobs
Using the at command, you can schedule commands for execution at a specified time. If you need to schedule repeated execution of a command, you can add the command to the cron file for a user.
To send an email with at:
1. | At the command prompt, type at followed by a time expression (see sidebar). For example, type
at teatime + 5 minutes |
2. | Yes, Virginia, teatime is a valid time expression for use with at (it means 4:00 P.M.), so teatime + 5 minutes means 4:05 P.M. |
3. | Press Enter.
On the new line, the shell prompt will be replaced with an at prompt, at> (Figure 12.1). Each valid command you type at the at> prompt will be executed at the specified time. |
4. | Give your email a subject and addressee: for example,
at> mail –s "Lemon ... |
Get Red Hat Linux 6: Visual QuickPro Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.