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