.Dd Created:2026-03-27|Updated:2026-03-27| .de ocsi \\$* , .. .de oxr .ocsi .Xr \\$* .. .de oit .It \\$* .. .de obdi .Bl -dash -compact .oit \\$* .. .de obdl .Bd -literal -compact \\$* .. .de onote .Bl -hang -compact .oit \\$* .El .. .de ocomm .Bl -diag -compact .oit \\$* .El .. .de opsy .Pp .Sy - \\$* .. .de obc .Bl -column \\$* .. .de obc2 .obc opt desc .. .de obc3 .obc option arguments description .. .de am .opsy Archlinux manpages: \\$* .. .de om .opsy OpenBSD manpages: \\$* .. .Dt CRONTAB oh .Os OpenBSD 7.8 , linux | .Nm crontab .Nd config and usage. .Sh OPTIONS .obc2 .It -e Ta : edit .It -l Ta : list .El This applies to the user crontab, the system crontab is /etc/crontab. .Sh CONFIGURATION .Dl MINUTE HOUR DAY_OF_MONTH MONTH DAY_OF_WEEK COMMAND The fields MINUTE, HOUR, DAY, MONTH, DAY_OF_WEEK can have the following values: .obdi Numeric: MINUTE (0-60), HOUR (0-23), DAY_OF_MONTh (1-31), MONTH (1-12), DAY_OF_WEEK (0-6). .D1 The week starts on Sunday with the value 0. .oit Asterisk: * means it executes every MINUTE, HOUR, DAY, MONTH, DAY_OF_WEEK depending on the field where it is set. .oit Text: The first 3 letters of the name of the month or day of the week. It is case-insensitive. MONTH (Jan-Dec), DAY_OF_WEEK (Sun-Sat). .oit Ranges: Example, using 15-30 for MINUTE will run every minute between the minutes 15 and 30. .oit Lists: Values can be separated by comma, example: DAY_OF_WEEK Mon,Wed to run on Mondays and Wednesdays. .oit Frequency: specified as /NUMBER, example: */10 will run every 10 minutes. .El .obdi The options can be combined, example: MINUTE 15-30/5,45 will run every 5 minutes between the minutes 15 and 30 and will also run at minute 45. .oit The command can be a command or command chain. .El .Ss Example .Dl 15 5-10 * * 1 5 date > log This will output date to the file log Monday through Friday 15 minutes after the hour between 5am and 10am any day of the month all months. .Sh IMPORTANT .Ss paths To ensure crontab can execute the command, use the full path of the command, which can be found using the command .Li whereis , and full path for files and directories. .Dl $ whereis date .obc2 .It OpenBSD output Ta : Li /bin/date .It linux output Ta : Li date: /usr/bin/date /bin/date /usr/man/man1/date.1.gz .El .Dl 15 5-10 * * 1 5 /usr/bin/date > /home/user/log .Ss Variables Some environment variables may not be found, environment variables can be set at the beginning of the crontab file. Example: .obdl HOME=/home/user 15 5-10 * * 1 5 /usr/bin/date > ${HOME}/log .Ed .Sh SEE ALSO .oxr linux oh .oxr command_line_intro oh .oxr command_line oh .Xr bash oh .om .oxr crontab 1 .Xr crontab 5 .Sh AUTHORS .An -nosplit .Xr ohazot oh | .Xr about oh | .Lk https://ohazot.com ohazot.com .Aq Mt admin@ohazot.com