Updated the version to 1.0.2. Made minor edits to the manual, especially with regard to the more esoteric examples.
This commit is contained in:
parent
b1e921ffc8
commit
bbbc3f17a7
2 changed files with 129 additions and 117 deletions
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
|
||||
AC_PREREQ(2.59)
|
||||
AC_INIT([mcron], [1.0.2rc1], [dale_mellor@users.sourceforge.net])
|
||||
AC_INIT([mcron], [1.0.2], [dale_mellor@users.sourceforge.net])
|
||||
AM_INIT_AUTOMAKE
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -413,20 +413,14 @@ The current implementation of mcron does not provide for an at command
|
|||
runs exactly once at a certain time). This can, however, be achieved.
|
||||
|
||||
Suppose the program @code{my-program} needs to be run at midnight
|
||||
tonight. A Guile script like the following should work. FIXME: TEST
|
||||
THIS EXAMPLE.
|
||||
tonight. A Guile script like the following would work (but a printed
|
||||
schedule, obtained with the @code{--schedule} option, will show
|
||||
superfluous entries).
|
||||
|
||||
@example
|
||||
(define my-program-flag #t)
|
||||
|
||||
(job (lambda (current-time)
|
||||
(if my-program-flag
|
||||
(begin
|
||||
(set! my-program-flag #f)
|
||||
(next-day-from current-time))
|
||||
99999999))
|
||||
(job '(next-day)
|
||||
(lambda () (system "my-program")
|
||||
(kill (getppid))))
|
||||
(kill (getppid) SIGINT)))
|
||||
@end example
|
||||
|
||||
@node Every second Sunday, Two hours every day, AT commands, Extended Guile examples
|
||||
|
|
@ -434,7 +428,7 @@ THIS EXAMPLE.
|
|||
@cindex examples, every second sunday
|
||||
To run @code{my-program} on the second Sunday of every month, a Guile
|
||||
script like the following should suffice (it is left as an exercise to
|
||||
the student to understand how this works!). FIXME: TEST THIS EXAMPLE.
|
||||
the student to understand how this works!).
|
||||
|
||||
@example
|
||||
(job (lambda (current-time)
|
||||
|
|
@ -442,11 +436,22 @@ the student to understand how this works!). FIXME: TEST THIS EXAMPLE.
|
|||
(first-day (tm:wday (localtime next-month)))
|
||||
(second-sunday (if (eqv? first-day 0)
|
||||
8
|
||||
(- 15 first-day))))
|
||||
(- 14 first-day))))
|
||||
(+ next-month (* 24 60 60 second-sunday))))
|
||||
"my-program")
|
||||
@end example
|
||||
|
||||
@cindex daylight savings time
|
||||
Note that this example is also instructive in that it demonstrates
|
||||
mcron's indeterminacy when the clocks are adjusted for summertime; use
|
||||
the @code{-s 12} option to @code{mcron}, and see the off-by-one hour
|
||||
error that occurs twice a year. This is a known problem, that
|
||||
daylight savings time shifts are not taken into account very well. If
|
||||
things are critical, your best bet is to set your TZ environment
|
||||
variable to `:Universal', and express all your configuration files in
|
||||
Universal Coordinated Time (UTC).
|
||||
|
||||
|
||||
|
||||
@node Two hours every day, Missing the first appointment, Every second Sunday, Extended Guile examples
|
||||
@subsection Two hours every day
|
||||
|
|
@ -832,7 +837,10 @@ some command. If no files are given on the command line, then mcron
|
|||
will look in the user's ~/.cron directory. In either case, files which
|
||||
end in the extension .vixie or .vix will be assumed to contain
|
||||
Vixie-style crontabs, and files ending .guile or .gle will be assumed
|
||||
to contain scheme code and will be executed as such.
|
||||
to contain scheme code and will be executed as such; ANY OTHER FILES
|
||||
WILL BE IGNORED - specify a file name of ``-'' and then pipe the files
|
||||
into the standard input if you really want to read them, possibly
|
||||
using the @code{stdin} option to specify the type of file.
|
||||
|
||||
The program accepts the following options.
|
||||
|
||||
|
|
@ -903,6 +911,10 @@ standard output.
|
|||
@cindex running crond
|
||||
@cindex @CONFIG_SPOOL_DIR@
|
||||
@cindex @CONFIG_SOCKET_FILE@
|
||||
NOTE THAT THIS SECTION ONLY APPLIES IF THE @code{cron} or
|
||||
@code{crond}, and @code{crontab} PROGRAMS HAVE BEEN INSTALLED BY THE
|
||||
SYSTEM ADMINISTRATOR.
|
||||
|
||||
If the program runs by the name of @code{cron} or @code{crond}, then
|
||||
it will read all the files in @code{@CONFIG_SPOOL_DIR@} (which should only
|
||||
be readable by root) and the file @code{/etc/crontab}, and then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue