Manual Page Search Parameters
DAILY(8) System Manager's Manual DAILY(8)


daily, weekly, monthlyperiodic system maintenance


The three files /etc/daily, /etc/weekly, and /etc/monthly are shell scripts run on a periodic basis by the clock daemon, cron(8). They take care of some basic administrative tasks. Their output, if any, is mailed to root.
Note: The scripts are all run as part of root's crontab(5). However, it is strongly suggested that the root mail account be an alias that forwards messages to a real user or set of users. Otherwise, root's mail will simply accumulate in /var/mail until the partition holding it runs out of space. See newaliases(8) for further details.
These scripts should not be altered. Local additions should be made to the files /etc/daily.local, /etc/weekly.local, and /etc/monthly.local, which will be executed by /etc/daily, /etc/weekly, and /etc/monthly, respectively. The *.local files are executed first, which makes it convenient to do any necessary cleanup and backup and to define any required shell variables before the script is run.


This script is run daily. It currently does the following:


This script is run weekly. It currently does the following:


This script is run monthly. It currently does the following:


The following variables can be set in /etc/daily.local:
If set to 0, do not run calendar(1).
If set to 1, run fsck(8) with the no-write flag.
If set to 1, make a backup of the root file system.
If set to 0, df(1), dump(8), and netstat(1) are skipped. Consequently, if none of the other commands produce any output, no mail will be sent to root.
The following variables can be set in /etc/weekly.local:
If set to 1, run ac(8) to report login accounting.
Arguments for makewhatis(8); empty by default.


Daily maintenance script.
Site specific daily maintenance script.
Weekly maintenance script.
Site specific weekly maintenance script.
Monthly maintenance script.
Site specific monthly maintenance script.
Root crontab(5).


calendar(1), crontab(1), df(1), locate(1), netstat(1), rdist(1), whatis(1), crontab(5), ac(8), accton(8), cron(8), dump(8), fsck(8), makewhatis(8), sa(8), security(8), yp(8)


The daily, weekly, and monthly scripts first appeared in 4.3BSD-Reno. This manual page first appeared in OpenBSD 3.4.


If the host machine is not running 24/7, these scripts may never be run. Adjusting the time fields in the system crontab(5) may partially alleviate this problem.
Be careful when adding local additions. Services such as “www” have their own users, and should be run as such, not as root. It may be more appropriate to create a separate crontab(5) for such services.
July 13, 2017 OpenBSD-current