commit 29673f6a9dc01e1dd3ed1bc316d811e3a715b925
parent dd43eac7c77411ca9150b58c048cd2b8f6998361
Author: Ari Malinen <ari.malinen@gmail.com>
Date: Fri, 30 Jan 2015 11:23:15 +0200
Update README and man page
Diffstat:
M | README | | | 48 | +++++++++++++++++++++++++----------------------- |
M | scron.1 | | | 19 | ++++++++++--------- |
2 files changed, 35 insertions(+), 32 deletions(-)
diff --git a/README b/README
@@ -1,29 +1,31 @@
scron
=====
+Simple cron daemon.
-about
------
-simple cron daemon, originally forked from
-https://github.com/defer-/scron.git
-
-features
+Features
--------
-schedule tasks
-single daemon and config
-log job output: command &>> /var/log/cron.log
-run as different user: su -c 'command' user
-log to stdout and syslog
-no mail support
+* Schedule commands to be run at specified dates and times.
+* Single daemon and configiguration file.
+* Log job output: 'command &>> /var/log/cron.log'.
+* Run job as different user: 'su -c 'command' user'.
+* Log to stdout or syslog.
+* No mail support.
+
+Configuration
+-------------
+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)
+
+Example of crontab file:
+ # Run updatedb at 6:00 every day
+ 0 6 * * * updatedb
-config
-------
-syntax:
-value: * (wildcard), 30 (number), */N (repeat), or 1-5 (range)
-separator: \t (tab)
+ # Run at 5:30 every business day. Log output to /var/log/backup.log.
+ 30 5 * * 1-5 syncbackup &>> /var/log/backup.log
-example:
-# tm_min tm_hour tm_mday tm_mon tm_wday command
-# 6:00 every day
-0 6 * * * updatedb
-# 5:30 every weekday
-30 5 * * 1-5 rsync -r --quiet /var/www backup@192.168.0.8:~
+ # Run as user postmaster at 5:00 every third day of month.
+ 0 5 */3 * * su -c 'mail -s "Hello world" a@b.com' postmaster
diff --git a/scron.1 b/scron.1
@@ -5,7 +5,7 @@
.Nm scron
.Nd clock daemon
.Sh SYNOPSIS
-.Nm cron
+.Nm
.Op Fl f Ar file
.Op Fl n
.Sh DESCRIPTION
@@ -25,18 +25,19 @@ Do not daemonize.
.Sh CONFIGURATION
Configuration is done by editing the crontab file.
-columns:
+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)
+Syntax:
+ Value: * (wildcard), 30 (number), */N (repeat), or 1-5 (range)
+ Separator: \\t (tab)
.Sh EXAMPLE
- # Run updatedb 6:00 every day
+Example of crontab file:
+ # Run updatedb at 6:00 every day
0 6 * * * updatedb
- # 5:30 every weekday. Log output to /var/log/backup.log.
+ # Run at 5:30 every business day. 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
+ # Run as user postmaster at 5:00 every third day of month.
+ 0 5 */3 * * su -c 'mail -s "Hello world" a@b.com' postmaster