pavement

At

From FreeBSDwiki
Revision as of 14:03, 25 August 2004 by Jimbo (Talk | contribs)
Jump to: navigation, search

The at scheduler is used to schedule a job for one-time-only running at a later date. For comparison, the cron scheduler is used to schedule jobs for repeated execution at regular intervals. One very handy use of the at scheduler is to schedule lengthy jobs to run in the background immediately - that way even if you need to (or are forced to) close your shell session, your job will continue running. For example:

ph34r# at now
cvsup /usr/share/examples/cvsup/ports-supfile
[user presses Control-D, aka the eof character, to indicate interactive job adding is done]
Job 3 will be executed using /bin/sh
ph34r#

You can force a job started from the shell into the background without using at simply by adding an ampersand to the end of your command line - for example:

ph34r# cvsup /usr/share/examples/cvsup/ports-supfile &

However, if started that way the job is still a child process of your shell, and thus will die a sudden death if you choose to log out before it is done.

Access to either cron or the at scheduler may be open to all users or restricted only to certain users at the system administrator's discretion.

Personal tools