scron

simple cron daemon
git clone git://git.2f30.org/scron.git
Log | Files | Refs | README | LICENSE

commit dd43eac7c77411ca9150b58c048cd2b8f6998361
parent faaae03f60cc506ecf60922017fd142dd1a2d038
Author: Ari Malinen <ari.malinen@gmail.com>
Date:   Thu Jan 29 20:08:34 +0200

Add man page

Diffstat:
Makefile | 6+++++-
scron.1 | 42++++++++++++++++++++++++++++++++++++++++++
2 files changed, 47 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile @@ -2,15 +2,19 @@ CC = gcc # x86_64-linux-musl-gcc CFLAGS = -Os -std=c99 -Wall -Wextra -pedantic -D_POSIX_C_SOURCE=200809L -D_BSD_SOURCE LDFLAGS = -s # -static PREFIX = /usr/local +MANPREFIX = $(PREFIX)/man all: crond install: all mkdir -p $(DESTDIR)$(PREFIX)/bin - install -m 755 crond $(DESTDIR)$(PREFIX)/bin + cp -f crond $(DESTDIR)$(PREFIX)/bin + mkdir -p $(DESTDIR)$(MANPREFIX)/man1 + cp -f scron.1 $(DESTDIR)$(MANPREFIX)/man1 uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/crond + rm -f $(DESTDIR)$(MANPREFIX)/man1/scron.1 clean: rm -f crond diff --git a/scron.1 b/scron.1 @@ -0,0 +1,42 @@ +.Dd Jan 29, 2015 +.Dt SCRON 1 +.Os +.Sh NAME +.Nm scron +.Nd clock daemon +.Sh SYNOPSIS +.Nm cron +.Op Fl f Ar file +.Op Fl n +.Sh DESCRIPTION +.Nm +schedules commands to be run at specified dates and times. +.Pp +.Sh OPTIONS +.Bl -tag -width Ds +.It Fl f Ar file +Use the specified +.Ar file +instead of the default +.Ar /etc/crontab . +.It Fl n +Do not daemonize. +.El +.Sh CONFIGURATION +Configuration is done by editing the crontab file. + +columns: + minute, hour, day of month, month, day of week, command + +syntax: + value: * (wildcard), 30 (number), */N (repeat), or 1-5 (range) + separator: \\t (tab) +.Sh EXAMPLE + # Run updatedb 6:00 every day + 0 6 * * * updatedb + + # 5:30 every weekday. Log output to /var/log/backup.log. + 30 5 * * 1-5 syncbackup &>> /var/log/backup.log + + # Run as user postmaster 5:00 every third day of month. + 0 5 * */3 * su -c 'mail -s “Hello world” a@b.com' postmaster