xref: /freebsd/libexec/atrun/atrun.man (revision 6829dae12bb055451fa467da4589c43bd03b1e64)
1.\" $FreeBSD$
2.Dd June 22, 2015
3.Dt ATRUN 8
4.Os
5.Sh NAME
6.Nm atrun
7.Nd run jobs queued for later execution
8.Sh SYNOPSIS
9.Nm atrun
10.Op Fl l Ar load_avg
11.Op Fl d
12.Sh DESCRIPTION
13.Nm Atrun
14runs jobs queued by
15.Xr at 1 .
16.Pp
17The system
18.Xr crontab 5
19file
20.Pa /etc/crontab
21must contain the line
22.Bd -literal
23*/5     *       *       *       *       root    /usr/libexec/atrun
24.Ed
25.Pp
26so
27.Nm
28is invoked every five minutes.
29.Pp
30At every invocation,
31.Nm
32starts all the jobs in the lowercase queues whose start
33time has elapsed.
34In addition, if the load average over the last minute was less than
35the specified limit, then a maximum of one batch job (denoted by the
36uppercase queues) is started.
37.Pp
38Before starting a job,
39.Nm
40checks the status of its owner's account with
41.Xr pam 3
42and refuses to run the job if the account is unavailable,
43e.g., locked out or expired.
44.Sh OPTIONS
45.Bl -tag -width indent
46.It Fl l Ar load_avg
47Specify a limiting load factor, over which batch jobs should
48not be run, instead of the default of 1.5 * number of active CPUs.
49.It Fl d
50Debug; print error messages to standard error instead of using
51.Xr syslog 3 .
52.El
53.Sh WARNINGS
54For
55.Nm
56to work, a
57.Xr cron 8
58daemon must be running
59.Nm
60periodically.
61.Sh FILES
62.Bl -tag -width /etc/pam.d/atrun -compact
63.It Pa /etc/pam.d/atrun
64.Xr pam.conf 5
65configuration file for
66.Nm
67.It Pa /var/at/jobs
68Directory containing job files
69.It Pa /var/at/spool
70Directory containing output spool files
71.El
72.Sh SEE ALSO
73.Xr at 1 ,
74.Xr crontab 1 ,
75.Xr pam 3 ,
76.Xr syslog 3 ,
77.Xr crontab 5 ,
78.Xr pam.conf 5 ,
79.Xr cron 8
80.Sh BUGS
81The functionality of
82.Nm
83should be merged into
84.Xr cron 8 .
85