From: thib Date: Thu, 3 Jan 2002 14:26:11 +0000 (+0000) Subject: Initial revision X-Git-Tag: ver1564~148 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=166adc48096128819767ea8593fdb8da6b042bbe;p=fcron Initial revision --- diff --git a/doc/Makefile.in b/doc/Makefile.in new file mode 100644 index 0000000..6113034 --- /dev/null +++ b/doc/Makefile.in @@ -0,0 +1,134 @@ +############################ +# fcron-doc's Makefile #### +############################ + +# @configure_input@ + +# $Id: Makefile.in,v 1.1 2002-01-03 14:27:07 thib Exp $ + +# The following should not be edited manually (use configure options) +# If you must do it, BEWARE : some of the following is also defined +# in config.h, so you must modify config.h AND Makefile in order +# to set the same values in the two files. + + +SRCDIR = @srcdir@ + +prefix = @prefix@ +DESTMAN = @mandir@ +DESTDOC = @DOCDIR@ + +INSTALL = @INSTALL@ +JADE = @JADE@ +ROOTNAME = @ROOTNAME@ +ROOTGROUP = @ROOTGROUP@ +ANSWERALL = @ANSWERALL@ + +#################################### +# Should not be changed under this # +#################################### +STYLESHEET = stylesheets/fcron-doc.dsl +MODFILE = fcron-doc.mod +VERSION = @VERSION@ +SGMLFILES = faq.sgml fcron-doc.sgml fdl.sgml thanks.sgml gpl.sgml todo.sgml fcron.8.sgml fcrontab.1.sgml install.sgml fcron.conf.5.sgml fcrontab.5.sgml readme.sgml +TXTFILES = readme install thanks faq gpl todo +MANPAGES = fcron.8 fcron.conf.5 fcrontab.1 fcrontab.5 + +# this is a regular expression : +# do not ci these files +RCSNOCI=.*\(bitstring.3\|fcron-doc.ced\|HTML.*\|txt.*\|man.*\) + +all: doc + +doc: HTML/index.html mandoc txtdoc + +mandoc: HTML/index.html + @(echo ; echo "Building man pages ..."; echo ) + cp -f bitstring.3 man/ + @(for i in $(MANPAGES); do \ + echo " $$i ..."; \ + echo ' \ + %decl;]>' > _tmp_ ; \ + echo "&$$i;" >> _tmp_ ; \ + jw -f docbook -b man -o man _tmp_ 2> /dev/null; \ + rm -f _tmp_ ; \ + done) + + +txtdoc: HTML/index.html + @(echo ; echo "Building txt files ..."; echo ) + @(for i in $(TXTFILES); do \ + echo " $$i ..."; \ + lynx -dump -nolist HTML/$$i.html > txt/$$i.txt; done ) + +fcron-doc.mod: fcron-doc.mod.in + @(echo ; echo "Building fcron-doc.mod"; echo) + ../script/gen-in.pl fcron-doc.mod.in fcron-doc.mod ../ + +HTML/index.html: $(SGMLFILES) fcron-doc.mod.in stylesheets/fcron-doc.dsl.in + @(echo ; echo "Building index.html"; echo) + rm -fR HTML/* + $(JADE) -t sgml -i html -d stylesheets/fcron-doc.dsl\#html fcron-doc.sgml + +install: clean + if test ! -d $(DESTMAN)/man1; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTMAN)/man1 ; fi + if test ! -d $(DESTMAN)/man3; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTMAN)/man3 ; fi + if test ! -d $(DESTMAN)/man5; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTMAN)/man5 ; fi + if test ! -d $(DESTMAN)/man8; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTMAN)/man8 ; fi + if test ! -d $(DESTDOC)/fcron-$(VERSION); then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTDOC)/fcron-$(VERSION) ; fi + if test ! -d $(DESTDOC)/fcron-$(VERSION)/txt; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 \ + -d $(DESTDOC)/fcron-$(VERSION)/txt/ ; fi + if test ! -d $(DESTDOC)/fcron-$(VERSION)/HTML; then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 \ + -d $(DESTDOC)/fcron-$(VERSION)/HTML/ ; fi + +# We need to 'cd ..' because SRCDIR may be set to '.', and we are in a sub directory + cd .. ; $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/man/fcron.8 $(DESTMAN)/man8 + cd .. ; $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/man/fcrontab.1 $(DESTMAN)/man1 + cd .. ; $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/man/fcrontab.5 $(DESTMAN)/man5 + cd .. ; $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/man/fcron.conf.5 $(DESTMAN)/man5 + cd .. ; $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/man/bitstring.3 $(DESTMAN)/man3 + cd .. ; for i in $(SRCDIR)/doc/txt/*; do \ + echo "$$i" ; \ + $(INSTALL) -m 644 -o $(ROOTNAME) $$i \ + $(DESTDOC)/fcron-$(VERSION)/txt/ ;\ + done + cd .. ; for i in $(SRCDIR)/doc/HTML/*; do \ + $(INSTALL) -m 644 -o $(ROOTNAME) $$i \ + $(DESTDOC)/fcron-$(VERSION)/HTML/ ;\ + done + +uninstall: + rm -fR $(DESTDOC)/fcron-$(VERSION) + rm -f $(DESTMAN)/man1/fcrontab.1 + rm -f $(DESTMAN)/man3/bitstring.3 + rm -f $(DESTMAN)/man5/fcrontab.5 + rm -f $(DESTMAN)/man5/fcron.conf.5 + rm -f $(DESTMAN)/man8/fcron.8 + + +htmltar: HTML/index.html clean + + @(ln -s HTML fcron-doc-html-$(VERSION)) + (tar -czvf fcron-doc-html-$(VERSION).tar.gz fcron-doc-html-$(VERSION)/*) + @(rm -f fcron-doc-html-$(VERSION)) + + +clean: + (for i in man txt stylesheets . ; do \ + cd $$i ; \ + echo "Cleaning : `pwd`"; \ + rm -f *~ *.html *.htm *.texi *.info *.refs manpage.links manpage.refs *.tar.gz ; \ + cd .. ; \ + done) + +tarclean: clean + rm -f Makefile stylesheets/fcron-doc.dsl fcron-doc.mod + +vclean: clean + rm -f HTML/* man/* txt/* + +tar: doc tarclean + @(find ./ -type f ! -regex '.*RCS.*' ! -regex "$(RCSNOCI)" \ + -exec ci -l {} \;) + diff --git a/doc/en/changes.sgml b/doc/en/changes.sgml new file mode 100644 index 0000000..2a0e8cd --- /dev/null +++ b/doc/en/changes.sgml @@ -0,0 +1,570 @@ + + + + + + Changes + + From version 2.0.0 to 2.1.0 + + PAM support for fcron and fcrontab (need testing ! - help would be appreciated). + + + Fcron now send a mail if a job has noticenotrun set and could not be run because of a queue full. + + + Fcron now compiles on AIX (thank you, John A. Parker !), and a few AIX-only bugs have been fixed, but it may remain some problems to correct. Please try, and tell me ! + + + We now use constants ROOTUID and ROOTGID instead of some hard-coded "0", and those constants are defined by the configure script (we use the uid/gid of the name given with the option "--with-root{name|group}"). It allows fcron to be run on system on which root is not uid/gid 0/0. + + + code cleaning. + + + bug fixed : setting lavg to (0,0,0) used to make the line be added in the lavg queue instead of the serial queue (but the lavgs were ignored anyway). + + + bug fixed : fcrontab's "-z" option was not ignoring previous user's fcrontab version. + + + bug fixed : on systems using putenv(), the var HOME, USER and SHELL wasn't correctly assigned. On system supporting setenv() (which is the default), the problem did not occur. (thanks go to Evan A. Zacks). + + + + + + From version 1.1.1 to 2.0.0 + + using SIGUSR2 on fcron makes it print its current schedule on syslog and toggles on/off the printing of debug info on syslog. + + + fcron behavior on serial and lavg queues overflow has changed : + in previous versions, it used to run a job to make room to put a new one. + As it may conduct to a overwhelming of system resources, the new job is now + refused (and not run). An error message is also logged through syslog. + + + a mail is now sent if the job exited due to a signal, or if exit status + is non-zero. Read FAQ if you experience problems about that. + + + added a FAQ. + + + bug fixed : a midmonthly job executed after the 15th of the month used + to cause an endless loop. Thanks go to Guy Geens (thanks a lot !). + + + bug fixed : inserting a job in serial queue or running a job not finished at startup was broken, unless the job was strict(no). + + + bug fixed : some 1.1.1 changes used to make fcron impossible to compile + without sendmail (./configure's option "--with-sendmail=no"). + + + bug fixed in sysV boot script : we know specify explicitly the path to fcron. + + + bug fixed : unresolved error used to occur on some system not defining + getopt_long(). + + + + + From version 1.1.0 to 1.1.1 + + security fix : sym link attack against fcrontab. + Any user allowed to use fcrontab used to be able to remove any fcrontab, + and potentially to truncate any file to zero-length (under certain + conditions, anyway). + + + fcron and fcrontab now have a configuration file : fcron.conf. + It contains the default paths (spool dir, etc) and programs to use + (editor, shell, etc). + Thanks to that file, several fcron processes can run simultaneously if they + have a different config (different spool dir and pid file). + + + added fcron's option "-m" to control the number of serial jobs which can be executed simultaneously. + + + added fcron's option "-n" to create a new spool dir. + + + command line syntax of fcrontab has changed : you can know use "user" (after the file name if any) instead of "-u user". + It should make fcrontab a little more intuitive. + + + It is now possible to put a user name between the time/date fields and + the shell command of a fcrontab line (for Vixie cron format compatibility) : + it is equivalent to runas(user). + + + support of Solaris (and SysV). + + + early support of OpenBSD. + + + the installation scripts now use nsswitch.conf to detect if a user or a group exists on the system. That way, naming services (NYS, ldap, etc) are supported. + + + the man page and doc is now installed by default in $prefix/share/{man|doc} (instead of the previous $prefix/{man|doc}) ($prefix is generally "/usr"). + + + bug corrected : fcron used not to add a serial_sev line to serial/lavg queue if this line was running, saying "already in serial queue". + + + + bug corrected : a "all" in fcron.allow with no fcron.deny file was not + considered as an allow rule. + + + + + From version 1.0.3 to 1.1.0 + + The binary format of the binary fcrontabs has changed : there is now no more + need to reinstall the fcrontabs when upgrading fcron (but you need to convert + your fcrontabs to the new format once), and this format should allow + extensions without losing any information. + + + better management of the errors in load/save fcrontabs functions. + + + the doc is a clearer about @-lines. + + + more security tests by fcrontab in the case it is suid root (but, if + possible, it should be suid fcron as it is far more secure). + + + we now remove unwanted fcrontabs before loading them in memory : well, + it seems to be more logical like that :)) . + + + bug fix : using options first with a &-line may have led to some problems + during the first read by fcron (mail send erroneously if noticenotrun was + used, bad set of the first execution's time and date or immediate execution + if bootrun was set : in fact, the line was not recognized as a new line). + + + bug fix : fcron used not to be able to be compiled from any directory because + of an absent -I. line option for the compiler (the config.h file was not + found). + + + + + From version 1.0.2 to 1.0.3 + + fcron can now be configured and compiled from any +directory (not only from the source dir). + + + bug fix : fcron now sets umask to the value it got +at start before running a job. + + + bug corrected : a bug used to make the "truncated" +system not to work correctly, so a too long log message used to make +fcron crash. + + + + + From version 1.0.1 to 1.0.2 + + the user for whom a job is run is now logged. + + + installation script is now more explicit about what it is going to do. + + + a boolean value can now also be set by "yes" and "no". + + + bug corrected : bootrun option works again. + + + bug corrected : shell variable containing underscore (_) used to be rejected. + + + bug corrected : installation script used not to check if user fcron was + in group fcron, in which case fcrontab doesn't work correctly (it cannot, + in that case, read the fcrontabs for non-privileged users). + + + + + From version 1.0.0 to 1.0.1 + + security fix : a user used to be able to read a file owned by root + if root runs a "fcrontab -u user -e". + + + + + From version 0.9.5 to 1.0.0 + + added fcron's option "-s" to control the time between two saves + of the fcrontabs on disk. + + + installation scripts now support better FreeBSD and sh. + + + bug corrected : configure's options prefix and without-sendmail used not + to work. + + + bug corrected : installing an fcrontab by "fcrontab file" wasn't working + correctly with a relative path (a path not beginning by a "/"). + + + + + From version 0.9.4 to 0.9.5 + + security fix : the jobs of a fcrontab reinstalled by root used to be run + as root (until the next action of the owner on the fcrontab). + + + added options strict and noticenotrun to tell fcron respectively if a job + should be removed from lavg queue if its execution interval is exceeded, + and if fcron should mail user to report the non-execution of a job. + + + added option nolog in order to log only errors (i.e. no message like "job x + started"). This can help to reduce the disk access and save energy on + a laptop, and make the log more readable if some jobs are run very often. + + + better handle of changes of the uids of users in /etc/passwd + (no more need to reinstall the fcrontabs). + + + fcron.deny and fcron.allow files are now owned by root (they used to be owned + by user fcron). + + + added ./configure's option --with-answer-all to be able to use "make install" + in a non-interactive way (can be useful for automatic installers). + + + added option --with-rootname and --with-rootgroup to ./configure script + for a better support of exotic systems. + + + bug corrected in make install (script user-group) : the script used not to + handle correctly the absence of both useradd and adduser commands. + This script now checks and tries to add a group fcron if necessary. + + + + + From version 0.9.3 to 0.9.4 + + security improvement : after the (horrible) root exploit found in version + 0.9.3, I decided to improve fcron/fcrontab's security. I've included some + strong (I hope :)) ) tests in fcron to ensure that only root can run commands + as superuser and use option runas. Even an corrupted fcrontab should not be + able to get root's privileges. Pretty reassuring, isn't it ? + + + runfreq(1) lines have been replaced and extended by a new kind of line : + the lines beginning by a "%". + It's now possible to tell fcron to run a command once an hour, a week, etc, + but only at some specified moments. + For instance : '%weekly * 4-7 echo "foo"' will run the command 'echo "foo"' + once a week between 4 and 7 in the morning. + (see "man 5 fcrontab" for more details). + + + installation process improved : user is now consulted before anything + is done about installation in boot scripts, etc. + The default username of fcron is now ... fcron ! (this is more secure than + daemon, which can be used by other programs). + + + fcron now adds the host name to the addresses of the mails it sends. + + + fcrontab determines the identity of the running user by his uid (it used + to use the var USER). That way, fcrontab should act as crontab under a "su". + + + bug fixed : a tmp file was not removed after a "fcron -z" + + + bug fixed in fcrontab : an expression of the form "start-stop" with + start > stop used to be incorrectly managed by fcron. + + + bug fixed : when fcron and fcrontab were installed under a non-privileged + user rights, a normal user used to be not able to use fcrontab. + + + bug fixed : while fcrontab was asking user if he would like to correct + an erroneous line, the answer was not correctly handled. + + + + + From version 0.9.2.1 to 0.9.3 + + installation scripts improved. + + + added code to avoid infinite loops. + + + bugs corrected in the functions to set the time and date of next execution. + + + bug corrected in the check for invalid lines. + + + + + From version 0.9.2 to 0.9.2.1 + + minor bug corrected in Makefile + + + + + From version 0.9.1 to 0.9.2 + + fcron now uses autoconf (the configure script), so it should be easier + to compile and install it and various systems. + + + support of lavg options for all systems where getloadavg() is defined + (BSD unix, etc) and on Linux systems with a proc filesystem (fcron can use + /proc/loadavg). + + + a job can now be executed several times simultaneously if option exesev + is set to 1. + + + user can determine if a job can be put several times in the serial queue + simultaneously thanks to option serialonce. + + + fcron does not wait anymore for the completion of all jobs of a file before + deleting it from memory. + + + fcron handles correctly the jobs which are both serial and lavg. + + + fcron now runs under a specific user and group (other than root) for basic + security reasons. + + + bug corrected : fcron used to crash after a file was deleted from memory + in some conditions. + + + corrected the bug which used to appear when a line was put several times + in the serial queue : in this case, fcron used not to count correctly + the number of running serial jobs. + + + bug corrected : fcrontab used not to remove the temporary file it creates + if no modification where done to a file after an edition using the -e option + and on errors. + + + bug corrected : fcrontab now defines correctly the remain value of a line + based on time and date beginning with a "&" but without runfreq definition. + + + bug corrected : fcron used to not install correctly a file edited if + a correction was made. + + + bug corrected : reset option was not working correctly when set to a single + line. + + + + + From version 0.9.0 to 0.9.1 + + support of the option mailto for each line + (it used to be set for the whole file). + + + the value of the runas and mailto options are now stored internally as a uid + number : you must reinstall all the system's fcrontabs if you change the uid + of a user. + + + Support of options "lavg*", in order to run a job under a specific 1, 5 + and/or 15 minutes system load average value(s). + When the job should be run, it is placed in a specific queue and the load + average is checked regularly until the right value(s) is/are got. + The options "lavgor" and "lavgand" permits users to tell fcron if they prefer + to perform a logic OR or AND between the 1, 5 and 15 load average values. + The option "until" can be use to force the execution of a job after + a determined timeout if the right conditions to run the job are not filled. + + + fcron now uses putenv() in place of setenv() (setenv() is not POSIX + compliant). + + + a mailto option set to "" is now equivalent to "mail(false)". + + + corrected the bug which used to make a bootrun and runfreq(1) job executed + twice when fcron's start occurs in an interval of execution of the job. + + + corrected the bug which used to make fcron crash after serial_array is + resized. + + + + + From version 0.8.3 to 0.9.0 + + support of options in fcrontabs. + Options can be specific to a line or defined once for + every line located after their definition (a special option "reset" set + all options to their default). + Some options also have too names: a long name and an abbreviation. + + + jobs can now be run be run one after the other (option "serial") : + when the job should normally be run, it is added to a queue, which entries + are executed one by one. + It permits to avoid the use of a lot of system resources for a brief moment + by the simultaneous execution of several tasks. + + + jobs can be run at system start up if they should have been run during + system down time (option "bootrun"). + + + root can run jobs as an another user (option "runas") + + + user can set a nice value to a job, but only root can use a negative value + (a negative value will increase priority) + + + user can choose to perform a logic AND or a logic OR between day of month + and day of week (option "dayor" and "dayand") + + + user can choose to mail the output of jobs (option "mail") if any, and can + force fcron to send a mail even if output is zero-length (option + "forcemail"). + + + fixed the bug which used to make fcron run a job with a runfreq set to 1 + at a wrong time. + + + fixed a bug which used to make fcrontab crash after several corrections + in edit mode. + + + + + From version 0.8.2 to 0.8.3 + + (all this bugs appeared in version 0.8.2 :) + + + fixed the bug which used to make fcron crash after a SIGHUP + + + fixed the bug which used to prevent fcron from running some job based + on time and date + + + fixed the bug which used to makes fcron run the jobs one second too late + + + + + From version 0.8.1 to 0.8.2 + + code has been optimized : + The jobs are now queued in order of execution. + It permits avoid useless tests of all jobs every time fcron wakes up, + speeds up the determination of the time fcron should sleep, + speeds up the processing after the end of a job, etc. + I don't know why I haven't made it before :-) ... + + + fcrontab has been improved : it is now more stable (many bugs which used to + make fcrontab crash in case of errors in the fcrontab has been fixed). + Plus, it now asks if you want to make corrections if needed when editing. + + + + + From version 0.8.0 to 0.8.1 + + ported to FreeBSD 4.0 + + + + + From version 0.7.0 to 0.8.0 + + corrected the bug which keep normal users from listing and editing + their current configuration file with fcrontab -l or -e. + + + corrected the bugs which used to block fcron when a task was marked + for execution but fcron stopped before it has been launched, and when + fcron stopped after the end of a job but before the output has been mailed. + + + day of week 0 and 7 now both mean Sunday. + + + the abbreviations of months and day of week are not any more case + dependent. + + + months are now defined from 1 to 12 (and not from 0 to 11) + (it was a little bit illogical :-). + + + you can now force spaces in strings if you place them in quotes. + + + I discovered ispell :-) ... + + + I've added a kind of signature in the formated configuration files in order + to keep the daemon from attempting to read an old configuration file which + doesn't use the same syntax. + + + You can now install a file with fcrontab from standard input. + + + others minor adds and bug corrections. + + + \ No newline at end of file diff --git a/doc/en/faq.sgml b/doc/en/faq.sgml new file mode 100644 index 0000000..3d31818 --- /dev/null +++ b/doc/en/faq.sgml @@ -0,0 +1,72 @@ + + + + + + Frequently Asked Questions + This FAQ intends to complete the man pages by providing a more practical approach. + If you think a QA should be added, please mail me it ! + + + + How does fcron handle system clock adjusts (daylight savings, etc) ? + + + First, you must know that fcron determines for each job the next time and date of execution, and then, sleep until a job should be run. In other words, fcron doesn't wake up like Vixie cron each minute to check all job in case one should be run ... and it avoids some problems concerning the clock adjusts. + That means that if the new time value is in the past, fcron won't run jobs twice. For instance it is 3:00, so the next job cannot be schedule before 3:00 (it would already has been run and re-scheduled), and you put your clock at 2:00 : fcron will just sleep until the next job should be executed, so after (and including) 3:01. + Now if you set the new time value in the future, fcron will run every jobs between the old and the new time value once. When fcron wakes up to run a job after the time value has changed, it runs all the jobs which should have run during the interval because they are scheduled to run in a past time. + You must also know that the @-jobs will run at "adjust-interval" too early or too late depending of the nature of the adjust. + To conclude, fcron behaves quite well for small clock adjusts : each job which should have run do run once, but not exactly at the correct time if the job was scheduled in the interval of the adjust. But if you have to make a big change in the time and date, you should probably reset all the scheduled "nextexe" by running "fcrontab -z" on all the fcrontabs. + + + + + How can I use fcrontab in scripts ? + + + You can use pipes with "fcrontab -l" (list the fcrontab) and "fcrontab -" (read the new fcrontab from input). For example : + echo -e "`fcrontab -l | grep -v exim`\n0 * * * * /usr/sbin/exim -q" | fcrontab - + + can be used to add a line. Another way to do it would be to list the fcrontab to a tmp file ("fcrontab -l > tmpfile"), then modify that file ("echo $LINE >> tmpfile") and finally replace the existing fcrontab by that one and remove the tmp file ("fcrontab tmpfile ; rm -f tmpfile"). + + + + + + How can I prevent fcrontab from considering the first word of my command line as "runas(word)" ? + + + Suppose you have an user called "echo" (weird idea ... :)) ). If you use the line '* * * * * echo "Hello !"' in root's fcrontab, + "echo" will be interpreted as "runas(echo)". + To avoid that, put your command in quotes : + * * * * * 'echo "Hello !"' + will work as expected (quotes are allowed for the shell command but not for the user name). + + + + + I have a job which usually terminates with a non-zero status, and I receive a mail with the exit status even if the command had no output : how can I avoid that ? + + + The easiest way is sure to set the option "mail" to "no". But if you still want to receive the output if there is one, you can add a command like "/bin/true" after your job to force the status to be 0, without affecting your job nor creating an output. For instance : + * * * * * /a/non/zero/status/job ; /bin/true + + + + + + diff --git a/doc/en/fcron-doc.sgml b/doc/en/fcron-doc.sgml new file mode 100644 index 0000000..1b2ccc4 --- /dev/null +++ b/doc/en/fcron-doc.sgml @@ -0,0 +1,98 @@ + +%decl; + +]> + + + + + + + + Fcron documentation + &date; + Fcron &version; development release)]]> + + + Thibault + Godouet + + + + ©rightdate; + Thibault Godouet + + + Fcron documentation + Copyright © ©rightdate; Thibault Godouet, &email; + Permission is granted to copy, distribute and/or modify this + document under the terms of the GNU Free Documentation License, + Version 1.1 or any later version published by the Free Software + Foundation; with the Back-Cover Texts being + + Back Cover Text. + A copy of the license is included in . + + + + &Fcron; is distributed under GPL license (please read the license in ). + Project home page : &webpage; + Author : Thibault GODOUET &email; + + + You can get the latest HTML version of this document at : &docurl; . The SGML DocBook sources are included with fcron packages. + + + + + + This release (&version;) - as every version of the + form x.y.z where y is an odd number -, is a + development release so it may + contain more bugs (and uglier ones :)) ) than a + stable release. + + + + + ]]> + + + + Fcron : how and why ? + This chapter will explain you what is &fcron;, why you should need it, +and how to install it. + &about; + &install; + &changes; + &todo; + &thanks; + + + + Using fcron ... + + Manual pages of fcron + This section contains the manual pages, which tell you how to use &fcron;. + &fcron.8; + &fcron.conf.5; + &fcrontab.1; + &fcrontab.5; + + &faq; + + + &gpl; + &fdl; + diff --git a/doc/en/fcron.8.sgml b/doc/en/fcron.8.sgml new file mode 100644 index 0000000..9f6588b --- /dev/null +++ b/doc/en/fcron.8.sgml @@ -0,0 +1,251 @@ + + + + + + + fcron + 8 + Fcron &version; development release)]]> + &date; + + + fcron + daemon to execute scheduled commands + + + + + fcron + -d + -f + -b + -s time + -m num + -c file + + + fcron + -n dir + + + fcron + -h + + + fcron + -V + + + + + Description + +&Fcron; should be started from /etc/rc or +/etc/rc.local. Unless the (or +) option is given, it will return +immediately, so you don't need to start it with '&'. + +&Fcron; loads users &fcrontabf;s (see &fcrontab;(5)) files previously installed by +fcrontab (see &fcrontab;(1)). Then, &fcron; calculates the +time and date of each job's next execution, and determines how long it +has to sleep, and sleeps for this amount of time. When it wakes up, it +checks all jobs loaded and runs them if needed. When a job is +executed, &fcron; forks, changes its user and group permissions to match +those of the user the job is being done for, executes that job and +mails the outputs to the user (this can be changed : see &fcrontab;(5)). + +Informative message about what &fcron; is doing are sent to +syslogd(8) under facility +cron, priority notice. +Warning and error messages are sent respectively at priority +warning and error. + + +&Fcron; sleeps at least &firstsleep; seconds after it has been started +before executing a job to avoid to use too much resources during +system boot. + + + + + Options + + + + + + + Don't fork to the background. In this mode, &fcron; will output informational message to standard error as well as to syslogd. + + + + + + + Force running in background, even if &fcron; has been compiled to run in foreground as default. + + + + time + time + + Save &fcrontabf;s on disk every t sec (default is 1800). + + + + num + num + + Set to n the maximum number of serial jobs which can run simultaneously. By default, this value is set to &serialmaxrunning;. + &seealso; option &optserial; in &fcrontab;(5). + + + + file + file + + Make &fcron; use config file +file instead of default config file +&etc;/&fcron.conf.location;. To interact with that running +&fcron; process, &fcrontab; must use the same config file (which is +defined by &fcrontab;'s option ). That way, several +&fcron; processes can run simultaneously on an only system (but each +&fcron; process *must* have a different spool dir and pid file from the +other processes). + + + + dir + dir + + Create dir as a new spool directory for &fcron;. Set correctly its mode and owner. Then, exit. + + + + + + + Display a brief description of the options. + + + + + + + Display an informational message about &fcron;, including its version and the license under which it is distributed. + + + + + + + Run in debug mode (more details on stderr (if option is set) and in log file) + + + + + + + Return values + &Fcron; returns &exitok; on normal exit, and &exiterr; on error. + + + + Signals + + + SIGTERM + + Save configuration (time remaining until next execution, time and date of next execution, etc), wait for all running jobs and exit. + + + + SIGUSR1 + + Force &fcron; to reload its configuration. + + + + SIGUSR2 + + Make &fcron; print its current schedule on syslog. It also toggles on/off the printing on debug info on syslog. + + + + SIGHUP + + Tell &fcron; to check if there is any configuration update (this signal is used by &fcrontab;(5)) + + + + + + + Conforming to + Should be POSIX compliant. + + + + Files + + + &etc;/&fcron.conf.location; + + Configuration file for &fcron; and &fcrontab; : contains paths (spool dir, pid file) and default programs to use (editor, shell, etc). See &fcron.conf;(5) for more details. + + + + &etc;/&fcron.allow; + + Users allowed to use &fcrontab; (one name per line, special name "all" acts for everyone) + + + + &etc;/&fcron.deny; + + Users who are not allowed to use &fcrontab; (same format as allow file) + + + + &etc;/pam.d/fcron (or &etc;/pam.conf) + + PAM configuration file for &fcron;. Take a look at pam(8) for more details. + + + + + + + See also + + &fcron.conf;(5) + &fcrontab;(1) + &fcrontab;(5) + + + + + Author + Thibault Godouet &email; + + + + diff --git a/doc/en/fcron.conf.5.sgml b/doc/en/fcron.conf.5.sgml new file mode 100644 index 0000000..04aaff2 --- /dev/null +++ b/doc/en/fcron.conf.5.sgml @@ -0,0 +1,138 @@ + + + + + + + fcron.conf + 5 + Fcron &version; development release)]]> + &date; + + + fcron.conf + configuration file for fcron and fcrontab + + + + Description + + This page describes the syntax used for the configuration file of &fcrontab;(1). and &fcron;(8). + + Blank lines, line beginning by a pound-sign (#) (which are considered comments), leading blanks and tabs are ignored. Each line in a &fcron.conf file is of the form +
+ name = value +
+where the blanks around equal-sign (=) are ignored and optional. Trailing blanks are also ignored. +
+ The following names are recognized (default value in brackets) : + + Valid variables in a fcron.conf file + + fcrontabs=directory (&fcrontabsdir;) + + &Fcron; spool directory + + + + pidfile=file-path (&fcron.pid;) + + Location of &fcron; pid file (needed by &fcrontab; to work properly). + + + + fcronallow=file-path (&etc;/&fcron.allow;) + + Location of fcron.allow file. + + + + fcrondeny=file-path (&etc;/&fcron.deny;) + + Location of fcron.deny file. + + + + shell=file-path (&shell;) + + Location of default shell called by &fcron; when running a job. + + + + sendmail=file-path (&sendmail;) + + Location of mailer program called by &fcron; to send job output. + + + + editor=file-path (&editor;) + + Location of default editor used when invoking "fcrontab -e". + + + +File-paths and directories are complete and absolute (i.e. beginning by a "/"). + To run several instances of &fcron; simultaneously on the same system, you must use a different configuration file for each instance. Each instance must have a different fcrontabs and pidfile. Then, use fcron(8)'s command line option -c to select which config file (so which instance) you refer to. +
+ + + Files + + + &etc;/&fcron.conf.location; + + Configuration file for &fcron; and &fcrontab; : contains paths (spool dir, pid file) and default programs to use (editor, shell, etc). See &fcron.conf(5) for more details. + + + + &etc;/&fcron.allow; + + Users allowed to use &fcrontab; (one name per line, special name "all" acts for everyone) + + + + &etc;/&fcron.deny; + + Users who are not allowed to use &fcrontab; (same format as allow file) + + + + &etc;/pam.d/fcron (or &etc;/pam.conf) + + PAM configuration file for &fcron;. Take a look at pam(8) for more details. + + + + + + + See also + + &fcron;(8) + &fcrontab;(1) + &fcrontab;(5) + + + + + Author + Thibault Godouet &email; + + +
+ + diff --git a/doc/en/fcrontab.1.sgml b/doc/en/fcrontab.1.sgml new file mode 100644 index 0000000..93e720e --- /dev/null +++ b/doc/en/fcrontab.1.sgml @@ -0,0 +1,196 @@ + + + + + + + fcrontab + 1 + Fcron &version; development release)]]> + &date; + + + fcrontab + manipulate per-user fcrontab files + + + + + fcrontab + -c file + -n + file + + user + -u user + + + + fcrontab + -c file + -n + + -l + -r + -e + -z + + + user + -u user + + + + fcrontab + -h + + + + + Description + &Fcrontab; is the program intended to install, edit, list and remove the tables used by &fcron;(8) daemon. As &fcron; internally uses a non-human readable format (this is needed because &fcron; saves more informations than the user gives, for example the time and date of next execution), the user cannot edit directly his &fcrontabf; (the one used by &fcron;). + When a user installs a &fcrontabf;, the source file is saved in the spool directory (&fcrontabsdir;) to allow future editions, a formatted file is generated for the &fcron; daemon, which is signaled once about ten seconds before the next minute for all changes made previously. The daemon is not signaled immediately to keep ill disposed users from blocking the daemon by installing &fcrontabf;s over and over. +We will call "fcrontab" the source file of the &fcrontabf; in the following. + A user can install a &fcrontabf; if he is listed in the &etc;/&fcron.allow; and not (unless by the keyword all) listed in &etc;/&fcron.deny; (see section "files" below). If neither fcron.allow nor fcron.deny exist, every users are allowed. None of these files have to exist, but if they do, the deny file takes precedence. + The first form of the command is used to install a new &fcrontabf; file, from any named file or from standard input if the pseudo-filename "-" is given, replacing the previous one (if any) : each user can have only one &fcrontabf;. + + + + Options + + + user + + Specify the user whose &fcrontabf; will be managed. Should only be used by root. If not given, the &fcrontabf; file of the user invoking &fcrontab; will be handled. It may be useful since the su(8) command may confuse &fcrontab;. +the 'user' in the synopsys is equivalent to a ' user'. + + + + + + + List user's current &fcrontabf; to standard output. + + + + + + Edit user's current &fcrontabf; using either the editor specified by the environment variable VISUAL, or EDITOR if VISUAL is not set. If none or them are set, &editor; will be used. + + + + + + Remove user's &fcrontabf;. + + + + + + Reinstall user's &fcrontabf; from its source code. All informations &fcron; may have kept in the binary &fcrontabf; (such as the last execution time and date) will be forgotten. + + + + + + Ignore previous version. If this option is not given, &fcron; will try to keep as much information as possible between old and new version of the &fcrontabf; (time and date of next execution, if job is in serial queue, etc) if the line hasn't been modified (same fields, same shell command). + + + + file + + Make &fcrontab; use config file file instead of default config file &etc;/&fcron.conf.location;. To interact with a running &fcron; process, &fcrontab; must use the same config file as the process. That way, several &fcron; processes can run simultaneously on an only system. + + + + + + Run in debug mode. In this mode, many informational messages will be output in order to check if anything went wrong. + + + + + + Display a brief description of the options. + + + + + + Display an informational message about &fcrontab;, including its version and the license under which it is distributed. + + + + + + + Return values + &Fcrontab; returns &exitok; on normal exit and &exiterr; on error. + + + + Conforming to + Should be POSIX compliant. + + + + Files + + + &etc;/&fcron.conf.location; + + Configuration file for &fcron; and &fcrontab; : contains paths (spool dir, pid file) and default programs to use (editor, shell, etc). See &fcron.conf;(5) for more details. + + + + &etc;/&fcron.allow; + + Users allowed to use &fcrontab; (one name per line, special name "all" acts for everyone) + + + + &etc;/&fcron.deny; + + Users who are not allowed to use &fcrontab; (same format as allow file) + + + + &etc;/pam.d/fcron (or &etc;/pam.conf) + + PAM configuration file for &fcron;. Take a look at pam(8) for more details. + + + + + + + See also + + &fcrontab;(5) + &fcron;(8) + &fcron.conf;(5) + + + + + Author + Thibault Godouet &email; + + + + + diff --git a/doc/en/fcrontab.5.sgml b/doc/en/fcrontab.5.sgml new file mode 100644 index 0000000..c6a5858 --- /dev/null +++ b/doc/en/fcrontab.5.sgml @@ -0,0 +1,567 @@ + + + + + + + fcrontab + 5 + Fcron &version; development release)]]> + &date; + + + fcrontab + tables for driving fcron + + + + Description + A &fcrontabf; is a file containing all tables used by the &fcron;(8) daemon. In other words, it is the means for a user to tell the daemon "execute this command at this moment". Each user has his own &fcrontabf;, whose commands are executed as his owner (only root can run a job as another using the option &optrunas; (see below)). + Blank lines, line beginning by a pound-sign (#) (which are considered comments), leading blanks and tabs are ignored. Each line in a fcrontab file can be either + + + an environment setting, + + + an option setting, + + + entries based on elapsed system up time, + + + entries based on absolut time (like normal crontab entries), or + + + entries run periodically. + + + Any logical line (an entry or an assignment) can be divided into several real lines (the lines which end by a newline character) by placing a backslash (\) before the newline character (\n). + + + The environment settings + The environment settings are of the form +
+ name = value +
+ where the blanks around equal-sign (=) are ignored and optional. Trailing blanks are also ignored, but you can place the value in quotes (simple or double, but matching) to preserve any blanks in the value. + When &fcron; executes a command, it always sets USER, HOME, and SHELL as defined in /etc/passwd for the owner of the &fcrontabf; from which the command is extracted. HOME and SHELL may be overridden by settings in the &fcrontabf;, but USER may not. Every other environment assignments defined in the user &fcrontabf; are then made, and the command is executed. + Plus, the special variable MAILTO allows you to tell &fcron; to whom it has to mail the command's output. Note that MAILTO is in fact equivalent to a global declaration of the option &optmailto; (see below). It is only used for backward compatibility, so you should use the option &optmailto; directly. + +
+ + + Entries based on elapsed system up time + The entries of commands which have to be run once every m minutes of &fcron;'s execution (which is normally the same as m minutes of system's execution) are of the form + @options frequency command + where frequency is a time value of the form value*multiplier+value*multiplier+...+value-in-minutes as "12h02" or "3w2d5h1". The first means "12 hours and 2 minutes of fcron execution" while the second means "3 weeks, 2 days, 5 hours and 1 minute of fcron execution". The only valid multipliers are: + + Valid time multipliers + + + + meaning : + multipliers : + + + + + months (4 weeks) : + m + + + weeks (7 days) : + w + + + days (24 hours) : + d + + + hours (60 minutes) : + h + + + +
+ + In place of options, user can put a time value : it will be interpreted as @first(time). If &optfirst; option is not set, the value of "frequency" is used. + This kind of entry does not guarantee a time and date of execution (as the job is delayed at each startup by the time elapsed since the shutdown), but should be useful for jobs depending on the number of things done by the users (for instance, the filesystem should better be checked after a certain amount of use by the users rather than every x days, as the system may run from 1 day to x days during that x days interval). + The time remaining before next execution is saved every &save; seconds (to limit damages caused by a crash) and when &fcron; exits after having received a SIGTERM signal, i.e. when systems go down. Thus, this kind of entries is particularly useful for systems that don't run regularly. The syntax being very simple, it may also useful for tasks which don't need to be run at a specific time and date. + &seealso; options &optfirst;, &optmail;, &optnolog;, &optserial;, &optlavg;, &optnice;, &optrunas; (see below). +
+ + + Entries based on time and date + The second type of &fcrontabf;'s entries begins by an optional "&", which can be immediately followed by an optional number defining the frequency of execution (this is equivalent to option &optrunfreq;) or a declaration of options; it has five time and date fields, and a shell command. Note that the shell command may be preceded by a user name, which is equivalent to runas(user): as it is only here for backward compatibility you should use option &optrunas; (see below) instead. The frequency is interpreted as: "run this command after x matches of time and date fields". The time and date fields are: + + Time and date fields + + + + field : + allowed values : + + + + + minute : + 0-59 + + + hour : + 0-23 + + + day of month : + 1-31 + + + month : + 1-12 (or names, see below) + + + day of week : + 0-7 (0 and 7 are both Sunday, or names) + + + +
+ A field is always filled by either an asterisk (*), which acts as "first-last" range, a single number or a list. + List are numbers or range separated with commas (,). For instance: "2,5,15,23". + Ranges of number are of the form "begin-end", where "begin" and "end" are included. For example, "3-5" specifies the values 3, 4 and 5. You can also add an optional "/number" to a range, where the number specifies skips of the number's value through the range. For example, "0-23/2" can be used in the hours field to specify command execution every other hour. Finally, one or several "~number" can be added to turn off some values in a range. For example, "5-8~6~7" is equivalent to "5,8". The final form of a field is: +
+ a[-b[/c][~d][~e][...]][,f[-g[/h][~i][~j][...]]][,...] +
+ where the letters are integers. + You can also use an asterisk (*) in a field. It acts for "first-last". For example, a "*" in the field minute means all minutes from minute 0 down to minute 59. + Ranges can be included in a list as a single number. For instance: "2,5-10/2~6,15,20-25,30". + Names can also be used for the "month" and "day of week" fields. To do so, use the first three letters of the particular day or month (case doesn't matter). Please note that names are used exactly as numbers: you can use them in a list or a range. + If a day of month and a day of week are given, the command will execute only when both match with the current time and date unless option &optdayor; is set. For example, with the line 5 10 31 * 7 echo '' echo will be executed only days which are a Sunday AND a 31th. + + &seealso; options &optdayor;, &optbootrun;, &optrunfreq;, &optmail;, &optnolog;, &optserial;, &optlavg;, &optnice;, &optrunas; (see below). +
+ + + Entries run periodically + The third type of &fcrontabf;'s entries begin by a "%", followed by one of the keywords : + + hourly + daily + monthly + weekly + + + midhourly + middaily + nightly + midmonthly + midweekly + + + mins + hours + days + mons + dow + + and optional options. + The keywords of the first line tell &fcron; to run the command once from the beginning of the corresponding interval to the end of that interval : for instance, the keyword weekly tells &fcron; to run a command once between Monday and Sunday each week. On top of that, the second list acts similarly but from middle to middle of the corresponding interval : midweekly will run a command once from Thursday to Wednesday. Note that nightly is equivalent to middaily. + With this two kind of keywords, user must give the needed time fields (as defined in "Entries based on time and date" (see above)) to specify when the command should be run during each interval : + + Needed time fields for each keyword + + + + Keywords : + must be followed by the fields : + + + + + hourly, midhourly : + minutes. + + + daily, middaily, nightly, weekly, midweekly : + minutes and hours. + + + monthly, midmonthly : + minutes, hours and days. + + + +
+ For example : + + %nightly * 21-23,3-5 echo "a monthly entry" + + will run the command once each night either between 21:00 and 23:59, or between 3:00 and 5:59. + &seealso; options &optlavg;, &optnoticenotrun;, &optstrict;, &optmail;, &optnolog;, &optserial;, &optnice;, &optrunas; (see below). + + The keywords of the third list act differently, as follows: + run this command once during EACH interval specified, ignoring the fields below the keyword in the interval definition (a hours prevents the mins field to be considered as an interval, but it will be used to determine when the line should be run during an interval : see the note below) (dow means "day of week"). + Such a keyword is followed by 5 time and date fields (the same fields used for a line based on absolut time (see above)). Furthermore, there must be some non-matching time and dates in the lines with that kind of keyword (i.e. the following is not allowed : %hours * 0-23 * * * echo but %hours * 0-22 * * * echo is allowed). + + a single number in a field is considered as an interval : %mins 15 2-4 * * * echo will run at 2:15, 3:15 AND 4:15 every day. + But every fields below the keywords are ignored in interval definition : %hours 15 2-4 * * * echo will run only ONCE either at 2:15, 3:15 OR 4:15. + +
+ + + Options + The options can be set either for every line below the declaration or for an individual line. In the first case, the setting is done on a whole line immediately after an exclamation mark (!), while it is done after a "&", a "%" or a "@" depending on the type of scheduling in the second case. Note that an option declaration in a schedule overrides the global declaration of that same option. + Options are separated by comas (,) and their arguments, if any, are placed between brackets ("(" and ")") and separated by comas. No spaces are allowed. A declaration of options is of the form +
+ option[(arg1[,arg2][...])][,option[(arg1[...])]][...] +
+ where option is either the name of an option or its abbreviation. The options are (default value between brackets) : + + Valid options in a &fcrontabf; + + reset + + boolean + Reset options to default. + + + + exesev + + boolean(false) + Can a job be executed several times simultaneously ? + &seealso; options &optserialonce;, &optlavgonce;. + + + + serialonce + + boolean(&serialoncedef;) + Can a job be queued several times in serial queue simultaneously ? + &seealso; options &optexesev;, &optlavgonce;. + + + + serial + s + + boolean(false) + &Fcron; runs at most &serialmaxrunning; serial jobs (and the same number of lavg serial jobs) simultaneously (but this value may be modified by &fcron;'s option ). + &seealso; options &optserialonce;, &optlavg;. + + + + bootrun + b + + boolean(false) + Run a &-line at &fcron;'s startup if it should have be run during system down time. + + + + first + f + + time-value + Delay before first execution of a job based on system up time ("@"-lines). + + + + runfreq + r + + integer + Run every "runfreq" matches of time and date. (this option is ignored for lines based on elapsed system up time). + + + + mailto + + user-name(name of file's owner) + Mail output (if needed) to "mailto". A &optmailto; declared and empty (string "") is equivalent to "mail(false)". + &seealso; options &optmail;, &optforcemail;, &optnolog;. + + + + mail + m + + boolean(true) + Mail output (if any) or not. + &seealso; options &optmailto;, &optforcemail;, &optnolog;. + + + + forcemail + + boolean(false) + Mail output even if zero-length. + &seealso; options &optmail;, &optmailto;, &optnolog;. + + + + nolog + + boolean(false) + If set to true, log only errors for the corresponding job(s). May be useful for jobs running very often, and/or to reduce disk access on a laptop. + &seealso; options &optmail;, &optmailto;, &optforcemail;. + + + + dayand + + boolean(true) + Perform a logic AND between week and month day. + &seealso; options &optdayor;. + + + + dayor + + boolean(false) + Perform a logic OR between week and month day. + &seealso; options &optdayand;. + + + + nice + n + + nice-value + Change job priority. A nice-value is an integer from -20 (highest priority) to 19 (lowest) (only root is allowed to use a negative value with this option). + + + + runas + + user-name + Run with "user-name" permissions and environment (only root is allowed to use this option). + + + + lavg + + real(0) real(0) real(0) + Set the values of the 1, 5 and 15 minutes (in this order) system load average values below which the job should run. The values have a maximum of 1 decimal (i.e. "2.3"), any other decimals are only used to round off. Set a value to 0 to ignore the corresponding load average (or all of the values to run the job regardless of the load average). + &seealso; options &optlavg1;, &optlavg5;, &optlavg15;, &optuntil;, &optlavgonce;, &optlavgor;, &optlavgand;, &optstrict;, &optnoticenotrun;. + + + + lavg1 + lavg5 + lavg15 + + real(0) + Set the threshold of, respectively, the 1, 5 or 15 minutes system load average value. Set one of them to 0 to ignore the corresponding load average. + &seealso; options &optlavg;. + + + + until + + time-value(0) + Set the timeout of the waiting of the wanted system load average values. If the timeout is exceeded, the job runs no matter the load average. Set until to 0 to remove the timeout. + &seealso; options &optlavg;. + + + + lavgonce + + boolean(&lavgoncedef;) + Can a job be queued several times in lavg queue simultaneously ? + &seealso; options &optlavg;. + + + + lavgand + + boolean(true) + Perform a logic AND between the 1, 5 and 15 minutes system load average values. + &seealso; options &optlavg;, &optlavgor;. + + + + lavgor + + boolean(false) + Perform a logic OR between the 1, 5 and 15 minutes system load average values. + &seealso; options &optlavg;, &optlavgand;. + + + + strict + + boolean(true) + When a lavg %-job is at the end of an interval of execution, should it be removed from the lavg queue (strict(true), so the job is not run) or be let there until the system load average allows its execution (strict(false)) ? + &seealso; options &optlavg;, &optnoticenotrun;. + + + + noticenotrun + + boolean(no) + Should &fcron; mail user to report the non-execution of a %-job or a &-job (because of system down state for both or a too high system load average for the latter). + &seealso; options &optlavg;, &optstrict;. + + + + tzdiff + + integer(0) + Time zone difference (in hours, between -24 and 24) between the system time, and the local real time. This option allows a user to define its & and %-lines in the local time. Note that this value is set for a whole fcrontab file, and only the last definition is taken into account. + &seealso; options &optlavg;, &optstrict;. + + + + A boolean argument can be inexistent, in which case brackets are not used and it means true; the string "true", "yes" or 1 to mean true; and the string "false", "no" or 0 to mean false. See above for explanations about time value (section "entries based on elapsed system up time"). + Note that dayand and dayor are in fact the same option : a false value to dayand is equivalent to a true to dayor, and reciprocally a false value to dayor is equivalent a true value to dayand. It is the same for lavgand and lavgor. + Note a special case to be handled : +A job should be entered into the serial queue, *but* the previous entry for this job has not been completed yet, because of high system load or some external event. Option serialonce answers the question : should the new entry of the job be ignored ? This way one can distinguish between jobs required to run a certain number of times, preferably at specified times, and tasks to be performed irrespective of their number (-> serialonce(true)), which make the system respond faster. + The same considerations apply for the load average queue, and can be expressed with option lavgonce. + Moreover, if the serial or the lavg queue contains respectively more than &serialqueuemax; and &lavgqueuemax; jobs, the next job in the serial queue or the job nearest to the until timeout in the lavg queue will be executed before adding a new job. + Finally, if jobs remain in the lavg or serial queues when fcron stops, they will be put once in the corresponding queue on startup (their order may not be conserved). + + An example of an option declaration : + !reset,serial(true),dayor,bootrun(0),mailto(root),lavg(.5,2,1.5) + +
+ +
+ + + Examples + + An example of a user fcrontab + +# use /bin/bash to run commands, ignoring what /etc/passwd says +SHELL=/bin/bash + +# mail output to thib, no matter whose fcrontab this is +!mailto(thib) + +# define a variable which is equivalent to " Hello thib and paul ! " +# here the newline characters are escaped by a backslash (\) +# and quotes are used to force to keep leading and trailing blanks +TEXT= " Hello\ + + +thib and\ + + +paul ! " + +# we want to use serial but not bootrun: +!serial(true),b(0) + +# run after five minutes of execution the first time, +# then run every hours +@first(5) 1h echo "Run every hours" + +# run every days +@ 1d echo "fcron daily" + +# run once between in the morning and once in the afternoon +# if systems is running at any moment of these intervals +&hours * 8-12,14-18 * * * echo "Hey boss, I'm working today !" + +# run once a week during our lunch +%weekly * 12-13 echo "I left my system on at least once \ + at lunch time this week." + +# run every Sunday and Saturday at 9:05 +5 9 * * sat,sun echo "Good morning Thibault !" + +# run every peer days of march at 18:00, except on 16th +0 18 2-30/2~16 Mar * echo "It's time to go back home !" + +# the line above is equivalent to +& 0 18 2-30/2~16 Mar * echo "It's time to go back home !" + +# reset options to default and set runfreq for lines below +!reset,runfreq(7) + +# run once every 7 matches (thanks to the declaration above), +# so if system is running every day at 10:00, this will be +# run once a week +& 0 10 * * * echo "if you got this message last time 7 days ago,\ + this computer has been running every day at 10:00 last week.\ + If you got the message 8 days ago, then the system has been down \ + one day at 10:00 since you got it, etc" + +# wait every hour for a 5 minutes load average under 0.9 +@lavg5(0.9) 1h echo "The system load average is low" + +# wait a maximum of 5 hours every day for a fall of the load average +@lavgand,lavg(1,2.0,3.0),until(5h) 1d echo "Load average is going down" + +# wait for the best moment to run a heavy job +@lavgor,lavg(0.8,1.2,1.5),nice(10) 1w echo "This is a heavy job" + +# run once every night between either 21:00 and 23:00 or +# between 3:00 and 6:00 +%nightly,lavg(1.5,2,2) * 21-23,3-6 echo "It's time to retrieve \ +the last release of Mozilla !" + + + + + Files + + + &etc;/&fcron.conf.location; + + Configuration file for &fcron; and &fcrontab; : contains paths (spool dir, pid file) and default programs to use (editor, shell, etc). See &fcron.conf(5) for more details. + + + + &etc;/&fcron.allow; + + Users allowed to use &fcrontab; (one name per line, special name "all" acts for everyone) + + + + &etc;/&fcron.deny; + + Users who are not allowed to use &fcrontab; (same format as allow file) + + + + &etc;/pam.d/fcron (or &etc;/pam.conf) + + PAM configuration file for &fcron;. Take a look at pam(8) for more details. + + + + + + + See also + + &fcron;(8) + &fcrontab;(1) + &fcron.conf;(5) + + + + + Author + Thibault Godouet &email; + + +
+ + diff --git a/doc/en/fdl.sgml b/doc/en/fdl.sgml new file mode 100644 index 0000000..0faf5e2 --- /dev/null +++ b/doc/en/fdl.sgml @@ -0,0 +1,458 @@ + +GNU Free Documentation License + + + + + + + Version 1.1, March 2000 + +
+ Copyright (C) 2000 Free Software Foundation, Inc. +59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +
+ + + PREAMBLE + + The purpose of this License is to make a manual, textbook, + or other written document "free" in the sense of freedom: to + assure everyone the effective freedom to copy and redistribute it, + with or without modifying it, either commercially or + noncommercially. Secondarily, this License preserves for the + author and publisher a way to get credit for their work, while not + being considered responsible for modifications made by + others. + + This License is a kind of "copyleft", which means that + derivative works of the document must themselves be free in the + same sense. It complements the GNU General Public License, which + is a copyleft license designed for free software. + + We have designed this License in order to use it for manuals + for free software, because free software needs free documentation: + a free program should come with manuals providing the same + freedoms that the software does. But this License is not limited + to software manuals; it can be used for any textual work, + regardless of subject matter or whether it is published as a + printed book. We recommend this License principally for works + whose purpose is instruction or reference. + + + + APPLICABILITY AND DEFINITIONS + + This License applies to any manual or other work that + contains a notice placed by the copyright holder saying it can be + distributed under the terms of this License. The "Document", + below, refers to any such manual or work. Any member of the + public is a licensee, and is addressed as "you". + + A "Modified Version" of the Document means any work + containing the Document or a portion of it, either copied + verbatim, or with modifications and/or translated into another + language. + + A "Secondary Section" is a named appendix or a front-matter + section of the Document that deals exclusively with the + relationship of the publishers or authors of the Document to the + Document's overall subject (or to related matters) and contains + nothing that could fall directly within that overall subject. + (For example, if the Document is in part a textbook of + mathematics, a Secondary Section may not explain any mathematics.) + The relationship could be a matter of historical connection with + the subject or with related matters, or of legal, commercial, + philosophical, ethical or political position regarding + them. + + The "Invariant Sections" are certain Secondary Sections + whose titles are designated, as being those of Invariant Sections, + in the notice that says that the Document is released under this + License. + + The "Cover Texts" are certain short passages of text that + are listed, as Front-Cover Texts or Back-Cover Texts, in the + notice that says that the Document is released under this + License. + + A "Transparent" copy of the Document means a + machine-readable copy, represented in a format whose specification + is available to the general public, whose contents can be viewed + and edited directly and straightforwardly with generic text + editors or (for images composed of pixels) generic paint programs + or (for drawings) some widely available drawing editor, and that + is suitable for input to text formatters or for automatic + translation to a variety of formats suitable for input to text + formatters. A copy made in an otherwise Transparent file format + whose markup has been designed to thwart or discourage subsequent + modification by readers is not Transparent. A copy that is not + "Transparent" is called "Opaque". + + Examples of suitable formats for Transparent copies include + plain ASCII without markup, Texinfo input format, LaTeX input + format, SGML or XML using a publicly available DTD, and + standard-conforming simple HTML designed for human modification. + Opaque formats include PostScript, PDF, proprietary formats that + can be read and edited only by proprietary word processors, SGML + or XML for which the DTD and/or processing tools are not generally + available, and the machine-generated HTML produced by some word + processors for output purposes only. + + The "Title Page" means, for a printed book, the title page + itself, plus such following pages as are needed to hold, legibly, + the material this License requires to appear in the title page. + For works in formats which do not have any title page as such, + "Title Page" means the text near the most prominent appearance of + the work's title, preceding the beginning of the body of the + text. + + + + VERBATIM COPYING + + You may copy and distribute the Document in any medium, + either commercially or noncommercially, provided that this + License, the copyright notices, and the license notice saying this + License applies to the Document are reproduced in all copies, and + that you add no other conditions whatsoever to those of this + License. You may not use technical measures to obstruct or + control the reading or further copying of the copies you make or + distribute. However, you may accept compensation in exchange for + copies. If you distribute a large enough number of copies you + must also follow the conditions in section 3. + + You may also lend copies, under the same conditions stated + above, and you may publicly display copies. + + + + COPYING IN QUANTITY + + If you publish printed copies of the Document numbering more + than 100, and the Document's license notice requires Cover Texts, + you must enclose the copies in covers that carry, clearly and + legibly, all these Cover Texts: Front-Cover Texts on the front + cover, and Back-Cover Texts on the back cover. Both covers must + also clearly and legibly identify you as the publisher of these + copies. The front cover must present the full title with all + words of the title equally prominent and visible. You may add + other material on the covers in addition. Copying with changes + limited to the covers, as long as they preserve the title of the + Document and satisfy these conditions, can be treated as verbatim + copying in other respects. + + If the required texts for either cover are too voluminous to + fit legibly, you should put the first ones listed (as many as fit + reasonably) on the actual cover, and continue the rest onto + adjacent pages. + + If you publish or distribute Opaque copies of the Document + numbering more than 100, you must either include a + machine-readable Transparent copy along with each Opaque copy, or + state in or with each Opaque copy a publicly-accessible + computer-network location containing a complete Transparent copy + of the Document, free of added material, which the general + network-using public has access to download anonymously at no + charge using public-standard network protocols. If you use the + latter option, you must take reasonably prudent steps, when you + begin distribution of Opaque copies in quantity, to ensure that + this Transparent copy will remain thus accessible at the stated + location until at least one year after the last time you + distribute an Opaque copy (directly or through your agents or + retailers) of that edition to the public. + + It is requested, but not required, that you contact the + authors of the Document well before redistributing any large + number of copies, to give them a chance to provide you with an + updated version of the Document. + + + + MODIFICATIONS + + You may copy and distribute a Modified Version of the + Document under the conditions of sections 2 and 3 above, provided + that you release the Modified Version under precisely this + License, with the Modified Version filling the role of the + Document, thus licensing distribution and modification of the + Modified Version to whoever possesses a copy of it. In addition, + you must do these things in the Modified Version: + + + Use in the Title Page + (and on the covers, if any) a title distinct from that of the + Document, and from those of previous versions (which should, if + there were any, be listed in the History section of the + Document). You may use the same title as a previous version if + the original publisher of that version gives permission. + + + List on the Title Page, + as authors, one or more persons or entities responsible for + authorship of the modifications in the Modified Version, + together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than + five). + + + State on the Title page + the name of the publisher of the Modified Version, as the + publisher. + + + Preserve all the + copyright notices of the Document. + + + Add an appropriate + copyright notice for your modifications adjacent to the other + copyright notices. + + + Include, immediately + after the copyright notices, a license notice giving the public + permission to use the Modified Version under the terms of this + License, in the form shown in the Addendum below. + + + Preserve in that license + notice the full lists of Invariant Sections and required Cover + Texts given in the Document's license notice. + + + Include an unaltered + copy of this License. + + + Preserve the section + entitled "History", and its title, and add to it an item stating + at least the title, year, new authors, and publisher of the + Modified Version as given on the Title Page. If there is no + section entitled "History" in the Document, create one stating + the title, year, authors, and publisher of the Document as given + on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. + + + Preserve the network + location, if any, given in the Document for public access to a + Transparent copy of the Document, and likewise the network + locations given in the Document for previous versions it was + based on. These may be placed in the "History" section. You + may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. + + + In any section entitled + "Acknowledgements" or "Dedications", preserve the section's + title, and preserve in the section all the substance and tone of + each of the contributor acknowledgements and/or dedications + given therein. + + + Preserve all the + Invariant Sections of the Document, unaltered in their text and + in their titles. Section numbers or the equivalent are not + considered part of the section titles. + + + Delete any section + entitled "Endorsements". Such a section may not be included in + the Modified Version. + + + Do not retitle any + existing section as "Endorsements" or to conflict in title with + any Invariant Section. + + + + If the Modified Version includes new front-matter sections + or appendices that qualify as Secondary Sections and contain no + material copied from the Document, you may at your option + designate some or all of these sections as invariant. To do this, + add their titles to the list of Invariant Sections in the Modified + Version's license notice. These titles must be distinct from any + other section titles. + + You may add a section entitled "Endorsements", provided it + contains nothing but endorsements of your Modified Version by + various parties--for example, statements of peer review or that + the text has been approved by an organization as the authoritative + definition of a standard. + + You may add a passage of up to five words as a Front-Cover + Text, and a passage of up to 25 words as a Back-Cover Text, to the + end of the list of Cover Texts in the Modified Version. Only one + passage of Front-Cover Text and one of Back-Cover Text may be + added by (or through arrangements made by) any one entity. If the + Document already includes a cover text for the same cover, + previously added by you or by arrangement made by the same entity + you are acting on behalf of, you may not add another; but you may + replace the old one, on explicit permission from the previous + publisher that added the old one. + + The author(s) and publisher(s) of the Document do not by + this License give permission to use their names for publicity for + or to assert or imply endorsement of any Modified Version. + + + + COMBINING DOCUMENTS + + You may combine the Document with other documents released + under this License, under the terms defined in section 4 above for + modified versions, provided that you include in the combination + all of the Invariant Sections of all of the original documents, + unmodified, and list them all as Invariant Sections of your + combined work in its license notice. + + The combined work need only contain one copy of this + License, and multiple identical Invariant Sections may be replaced + with a single copy. If there are multiple Invariant Sections with + the same name but different contents, make the title of each such + section unique by adding at the end of it, in parentheses, the + name of the original author or publisher of that section if known, + or else a unique number. Make the same adjustment to the section + titles in the list of Invariant Sections in the license notice of + the combined work. + + In the combination, you must combine any sections entitled + "History" in the various original documents, forming one section + entitled "History"; likewise combine any sections entitled + "Acknowledgements", and any sections entitled "Dedications". You + must delete all sections entitled "Endorsements." + + + + COLLECTIONS OF DOCUMENTS + + You may make a collection consisting of the Document and + other documents released under this License, and replace the + individual copies of this License in the various documents with a + single copy that is included in the collection, provided that you + follow the rules of this License for verbatim copying of each of + the documents in all other respects. + + You may extract a single document from such a collection, + and distribute it individually under this License, provided you + insert a copy of this License into the extracted document, and + follow this License in all other respects regarding verbatim + copying of that document. + + + + AGGREGATION WITH INDEPENDENT WORKS + + A compilation of the Document or its derivatives with other + separate and independent documents or works, in or on a volume of + a storage or distribution medium, does not as a whole count as a + Modified Version of the Document, provided no compilation + copyright is claimed for the compilation. Such a compilation is + called an "aggregate", and this License does not apply to the + other self-contained works thus compiled with the Document, on + account of their being thus compiled, if they are not themselves + derivative works of the Document. + + If the Cover Text requirement of section 3 is applicable to + these copies of the Document, then if the Document is less than + one quarter of the entire aggregate, the Document's Cover Texts + may be placed on covers that surround only the Document within the + aggregate. Otherwise they must appear on covers around the whole + aggregate. + + + + TRANSLATION + + Translation is considered a kind of modification, so you may + distribute translations of the Document under the terms of section + 4. Replacing Invariant Sections with translations requires + special permission from their copyright holders, but you may + include translations of some or all Invariant Sections in addition + to the original versions of these Invariant Sections. You may + include a translation of this License provided that you also + include the original English version of this License. In case of + a disagreement between the translation and the original English + version of this License, the original English version will + prevail. + + + + TERMINATION + + You may not copy, modify, sublicense, or distribute the + Document except as expressly provided for under this License. Any + other attempt to copy, modify, sublicense or distribute the + Document is void, and will automatically terminate your rights + under this License. However, parties who have received copies, or + rights, from you under this License will not have their licenses + terminated so long as such parties remain in full + compliance. + + + + FUTURE REVISIONS OF THIS LICENSE + + The Free Software Foundation may publish new, revised + versions of the GNU Free Documentation License from time to time. + Such new versions will be similar in spirit to the present + version, but may differ in detail to address new problems or + concerns. See http://www.gnu.org/copyleft/. + + Each version of the License is given a distinguishing + version number. If the Document specifies that a particular + numbered version of this License "or any later version" applies to + it, you have the option of following the terms and conditions + either of that specified version or of any later version that has + been published (not as a draft) by the Free Software Foundation. + If the Document does not specify a version number of this License, + you may choose any version ever published (not as a draft) by the + Free Software Foundation. + + + + How to use this License for your documents + + To use this License in a document you have written, include + a copy of the License in the document and put the following + copyright and license notices just after the title page: + +
+ Copyright (c) YEAR YOUR NAME. + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with the Invariant Sections being LIST THEIR TITLES, with the + Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + A copy of the license is included in the section entitled "GNU + Free Documentation License". +
+ + If you have no Invariant Sections, write "with no Invariant + Sections" instead of saying which ones are invariant. If you have + no Front-Cover Texts, write "no Front-Cover Texts" instead of + "Front-Cover Texts being LIST"; likewise for Back-Cover + Texts. + + If your document contains nontrivial examples of program + code, we recommend releasing these examples in parallel under your + choice of free software license, such as the GNU General Public + License, to permit their use in free software. +
+ +
+ + diff --git a/doc/en/gpl.sgml b/doc/en/gpl.sgml new file mode 100644 index 0000000..d71c742 --- /dev/null +++ b/doc/en/gpl.sgml @@ -0,0 +1,159 @@ + +GNU GENERAL PUBLIC LICENSE + + Version 2, June 1991 + +
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc. +59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +
+ + + PREAMBLE + + The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. + +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. + + + + + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: + + * a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + + * b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + + * c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + + * a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + * b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + + * c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. + +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + END OF TERMS AND CONDITIONS + + + + How to use this License for your documents + + If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + +
+one line to give the program's name and an idea of what it does. +Copyright (C) yyyy name of author + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +
+ + Also add information on how to contact you by electronic and paper mail. + + If the program is interactive, make it output a short notice like this when it starts in an interactive mode: + Gnomovision version 69, Copyright (C) year name of author +Gnomovision comes with ABSOLUTELY NO WARRANTY; for details +type `show w'. This is free software, and you are welcome +to redistribute it under certain conditions; type `show c' +for details. + + The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. + You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: +
+ Yoyodyne, Inc., hereby disclaims all copyright +interest in the program `Gnomovision' +(which makes passes at compilers) written +by James Hacker. + signature of Ty Coon, 1 April 1989 +Ty Coon, President of Vice +
+ + This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. + +
+ +
+ + diff --git a/doc/en/install.sgml b/doc/en/install.sgml new file mode 100644 index 0000000..cb79638 --- /dev/null +++ b/doc/en/install.sgml @@ -0,0 +1,161 @@ + + + + + + How to install fcron + + + uncompress the archive : + bash$ tar -xzf fcron-X.Y.Z.src.tar.gz + + + cd to the archive directory + bash$ cd fcron-X.Y.Z + + + run the configure script : + bash$ ./configure + + + + + + The command make install asks you + by default some questions you have to answer. To avoid + that (which can be useful for automatic installers), + you can use the ./configure's + option (see + "./configure + " for more details). + + + + + You may also want to change the place where &fcron; will + be installed: you can use the configure + 's option to do + that. For instance : ./configure + + (default is prefix=/usr) + + + + + To disable the use of PAM, + use configure's option + . + + + To debug &fcron;, you should use configure + 's option . + + + + + You can get info on the others configure + 's options by running + "./configure + ". + + + + + + + + + The configure script may not define + a correct directory for the man pages and the + documentation on some systems. You may check the + values defined by configure + and if necessary force a value by the options + and (see the help by running + "./configure + "). + + + + + If you get older &fcron;'s man-pages with + man + command after having upgraded, it's probably because + &fcron; has changed its default man directory : you + should remove manually the outdated man-pages. + + + + + The Makefile has been designed for + GNU make. + Some other version of make may fail + to use it. + + + + + + + + + check the file config.h, and change + it if necessary (the configurable part is on the top of + the file and clearly delimited). + + + + compile : + bash$ make + + + + then install binaries as root : + bash$ su root + bash# make install + + + You can now run fcron and + fcrontab. + + + + + This is a POSIX + conforming software. You must have a + POSIX compiler + (gcc for example) + in order to compile it. + + + + + This software has been written for + GNU/Linux systems. If you want + to port it on an other Unix platform + (thank you if you do it), try to modify - if possible - only + the configure script. + Please send me any modifications at &email; + in order to include it in future releases. + + + + + + + + diff --git a/doc/en/readme.sgml b/doc/en/readme.sgml new file mode 100644 index 0000000..23030cf --- /dev/null +++ b/doc/en/readme.sgml @@ -0,0 +1,146 @@ + + + + + + About fcron + + What is fcron ? + &Fcron; is a scheduler. It aims at replacing Vixie + Cron, so it implements most of its + functionalities. + But contrary to Vixie Cron, &fcron; + does not need your system to be up 7 days a week, 24 hours a day : + it also works well with systems which are not running neither all + the time nor regularly (contrary to + anacrontab). + In other words, &fcron; does both the job of + Vixie Cron and + anacron, but does even more and better + :)) ... + + To do so, &fcron; allows you to use the standard mode in which you + tell it to execute one command at a given date and hour and to make + it run a command according to its time of execution, which is + normally the same as system up time. For example : + +
+ Run the task 'save /home/ directory' every 3h15 of system + up time. +
+ and, of course, in order to make it really useful, the time + remaining until next execution is saved each time the system + is stopped. You can also say : + +
+ run that command once between 2am and 5am +
+ + which will be done if the system is running at any time in this + interval.
+ + &Fcron; also includes a useful system of options, which can be + applied either to every lines following the declaration or to a + single line. Some of the supported options permit to: + + run jobs one by one (fcrontab option &optserial;), + set the max system load average value under + which the job should be run (fcrontab option &optlavg;), + set a nice value for a job (fcrontab option &optnice;), + run jobs at &fcron;'s startup if they should have + been run during system down time (fcrontab option &optbootrun;), + mail user to tell him a job has not run and + why (fcrontab option &optnoticenotrun;), + a better management of the mailing of + outputs ... + + +
+ + + License + &Fcron; is distributed under GPL license (please read the license in the gpl file). + + + + Requirements + + + a Linux/Unix system + &Fcron; should work on every + POSIX system, but it has been + developed on Mandrake Linux + (so it should work without any problems + on Redhat). + Fcron 2.1.0 has been reported to work correctly on : + + + Mandrake 8.0 + + Debian 2.2 + + LFS-2.3+ + (take a look at the LFS guide for the installation informations) + + FreeBSD 4.2 + + OpenBSD 2.8 + + Solaris 8 + + AIX 4.3.3 + + + (but should work on many more systems thanks to + configure + script). Anyway, if you have troubles making it work on a + POSIX system, please contact + me at &email;. + + a running syslog + (or you won't have any log) + a running mail system ( + sendmail or + postfix for + example) (or users will not able to read their jobs output) + + (optional) a PAM + library. + + + + + Compilation and installation + See the INSTALL file. + + + + Configuration + See the &fcron;(8), + &fcrontab;(5) and + &fcrontab;(1) manpages. + + + + Bug reports, corrections, propositions... + Please send me the description of any bug you happen to encounter + (with, even better, the corresponding patch -:) and any + propositions, congratulations or flames at &email; + +
+ + diff --git a/doc/en/thanks.sgml b/doc/en/thanks.sgml new file mode 100644 index 0000000..cbc75df --- /dev/null +++ b/doc/en/thanks.sgml @@ -0,0 +1,67 @@ + + + + + + Thanks + + + Uwe Ohse uwe@ohse.de + + Corrected a bug concerning the signals, has reported security issues. + + + + Max Heijndijk cchq@wanadoo.nl + + Has made the rpm packages. + + + + Gabor Z. Papp gzp@papp.hu + + Helped to correct some bugs in installation process and reported various bugs. + + + + Clemens Fischer rabat@web.de + + Proofread docs, reported bugs, and made some propositions. + + + + Henrique de Moraes Holschuh hmh@debian.org + + Has worked on fcron's integration in Linux Debian system, reported bugs and corrected some of them, made some propositions. + + + + Thomas Whateley thomas@whateley.net + + Has done a big part of Solaris port, implemented the fcron.conf file, and Vixie crontab format support. + + + + Guy Geens ggeens@iname.com + + Fixed a nasty bug in goto_non_matching() which caused an endless loop (midmonthly jobs executed after the 15th of the month). + + + + + + diff --git a/doc/en/todo.sgml b/doc/en/todo.sgml new file mode 100644 index 0000000..585373c --- /dev/null +++ b/doc/en/todo.sgml @@ -0,0 +1,46 @@ + + + + + + Todo + Here are some things that should be done ... + If you plan to help me, please send a mail at &email; to prevent two people from doing the same thing. You can send me some propositions as well. + + + PAM support (ongoing) + + + convert the doc into DocBook(ongoing), and make it easier to read and understand + + + allow a non-privileged user to run fcron + + + possibility to display a list of jobs including their options, time and date of next execution, status, of only the running jobs, all the jobs, in order of execution or classified by user, etc. + + + run one of this job, change its nice value, stop it... + + + add a system of data flow + + + + + + diff --git a/doc/fcron-doc.mod.in b/doc/fcron-doc.mod.in new file mode 100644 index 0000000..8ba74ba --- /dev/null +++ b/doc/fcron-doc.mod.in @@ -0,0 +1,79 @@ + + + + + + +&emailadr;"> + +&webpageadr;'> +&webpageadr/fcron-doc.tar.gz'> + + + + + + + + + + + + + + + + + + + + + +see also :"> +fcron"> +Fcron"> +fcrontab"> +Fcrontab"> +fcrontab"> +fcron.conf"> + + + + + + + + + + + + + + + + +bootrun'> +dayand'> +dayor'> +exesev'> +first'> +forcemail'> +lavg'> +lavg1'> +lavg5'> +lavg15'> +lavgand'> +lavgonce'> +lavgor'> +mail'> +mailto'> +nice'> +nolog'> +noticenotrun'> +reset'> +runas'> +runfreq'> +serial'> +serialonce'> +strict'> +until'> diff --git a/doc/stylesheets/fcron-doc.dsl.in b/doc/stylesheets/fcron-doc.dsl.in new file mode 100644 index 0000000..fed3647 --- /dev/null +++ b/doc/stylesheets/fcron-doc.dsl.in @@ -0,0 +1,378 @@ + + + +]]> + + +]]> + + + +%decl; + +]> + + + + + + +;; ============================== +;; customize the print stylesheet +;; ============================== + +(declare-characteristic preserve-sdata? + ;; this is necessary because right now jadetex does not understand + ;; symbolic entities, whereas things work well with numeric entities. + "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" + #f) + +(define %generate-article-toc% + ;; Should a Table of Contents be produced for Articles? + #t) + +(define (toc-depth nd) + 2) + +(define %generate-article-titlepage-on-separate-page% + ;; Should the article title page be on a separate page? + #f) + +(define %section-autolabel% + ;; Are sections enumerated? + #t) + +(define %footnote-ulinks% + ;; Generate footnotes for ULinks? + #f) + +(define %bop-footnotes% + ;; Make "bottom-of-page" footnotes? + #f) + +(define %body-start-indent% + ;; Default indent of body text + 0pi) + +(define %para-indent-firstpara% + ;; First line start-indent for the first paragraph + 0pt) + +(define %para-indent% + ;; First line start-indent for paragraphs (other than the first) + 0pt) + +(define %block-start-indent% + ;; Extra start-indent for block-elements + 0pt) + +(define formal-object-float + ;; Do formal objects float? + #t) + +(define %hyphenation% + ;; Allow automatic hyphenation? + #t) + +(define %admon-graphics% + ;; Use graphics in admonitions? + #f) + + + + + + + + + + +(declare-characteristic preserve-sdata? + ;; this is necessary because right now jadetex does not understand + ;; symbolic entities, whereas things work well with numeric entities. + "UNREGISTERED::James Clark//Characteristic::preserve-sdata?" + #f) + +(define %generate-legalnotice-link% + ;; put the legal notice in a separate file + #t) + +(define %funcsynopsis-decoration% + ;; make funcsynopsis look pretty + #t) + +(define %html-ext% + ;; when producing HTML files, use this extension + ".html") +(define use-output-dir + #t) +(define %output-dir% + "HTML") +(define %root-filename% + ;; The filename of the root HTML document (e.g, "index"). + "index") +(define %use-id-as-filename% + ;; Use ID attributes as name for component HTML files? + #t) +(define (chunk-skip-first-element-list) + ;; forces the Table of Contents on separate page + '()) +(define (chunk? #!optional (nd (current-node))) + ;; 1. The (sgml-root-element) is always a chunk. + ;; 2. If nochunks is #t or the dbhtml PI on the root element + ;; specifies chunk='no', then the root element is the only + ;; chunk. + ;; 3. Otherwise, elements in the chunk-element-list are chunks + ;; unless they're combined with their parent. + ;; 4. Except for bibliographys, which are only chunks if they + ;; occur in book or article. + ;; 5. Except for sect1 if they are in an appendix. + ;; 6. And except for sections, which are only chunks if they + ;; are not too deep + ;; + (let* ((notchunk (or (and (equal? (gi nd) (normalize "bibliography")) + (not (or (equal? (gi (parent nd)) (normalize "book")) + (equal? (gi (parent nd)) (normalize "article"))))) + (and (equal? (gi nd) (normalize "section")) + (equal? (gi (parent nd)) (normalize "section")) + (>= (section-element-depth nd) + (chunk-section-depth))) + (and (equal? (gi nd) (normalize "sect1")) + (equal? (gi (parent nd)) (normalize "appendix"))))) + (maybechunk (not notchunk))) + (if (node-list=? nd (sgml-root-element)) + #t + (if (or nochunks + (equal? (dbhtml-value (sgml-root-element) "chunk") "no")) + #f + (if (member (gi nd) (chunk-element-list)) + (if (combined-chunk? nd) + #f + maybechunk) + #f))))) + +(define (list-element-list) + ;; fixes bug in Table of Contents generation + '()) + +(define %shade-verbatim% + ;; verbatim sections will be shaded if t(rue) + #t) +(define (shade-verbatim-attr-element element) + (list + (list "BORDER" "0") + (list "BGCOLOR" (car (cdr (shade-verbatim-element-colors element)))) + (list "WIDTH" ($table-width$)))) + +(define %graphic-extensions% + ;; graphic extensions allowed + '("gif" "png" "jpg" "jpeg" "tif" "tiff" "eps" "epsf" )) +(define %graphic-default-extension% + "gif") + +(define %section-autolabel% + ;; For enumerated sections (1.1, 1.1.1, 1.2, etc.) + #t) +(define (toc-depth nd) + ;; more depth (2 levels) to toc; instead of flat hierarchy + ;; 2) + 4) +(define %generate-book-toc% + ;; Should a Table of Contents be produced for books? + #t) +(define %generate-book-titlepage% + ;; produce a title page for books + #t) +(define (book-titlepage-recto-elements) + ;; elements on a book's titlepage + ;; note: added revhistory to the default list + (list (normalize "title") + (normalize "subtitle") + (normalize "graphic") + (normalize "mediaobject") + (normalize "corpauthor") + (normalize "authorgroup") + (normalize "author") + (normalize "editor") + (normalize "copyright") + (normalize "revhistory") + (normalize "abstract") + (normalize "pubdate") + (normalize "releaseinfo") + (normalize "legalnotice"))) +(define %generate-article-toc% + ;; Should a Table of Contents be produced for articles? + #t) +(define %generate-part-toc% + ;; Should a Table of Contents be produced for parts? + #t) + + + +(define %gentext-nav-use-tables% + #t) +(define %gentext-nav-use-ff% + #f) +(define (default-header-nav-tbl-noff elemnode prev next prevsib nextsib) + (let* ((book (ancestor-member (current-node) (list (normalize "book")))) + (info (select-elements (children book) (normalize "bookinfo"))) + (notice (select-elements (children info) (normalize "legalnotice")))) + (let* ((r1? (nav-banner? elemnode)) + (r1-sosofo (make element gi: "TR" + (make element gi: "TH" + attributes: (list + (list "COLSPAN" "3") + (list "ALIGN" "center")) + (nav-banner elemnode)))) + (r2? (or (not (node-list-empty? prev)) + (not (node-list-empty? next)) + (nav-context? elemnode))) + (r2-sosofo (make element gi: "TR" + (make element gi: "TD" + attributes: (list + (list "WIDTH" "10%") + (list "ALIGN" "left") + (list "VALIGN" "bottom")) + (if (node-list-empty? prev) + (make entity-ref name: "nbsp") + (make element gi: "A" + attributes: (list + (list "HREF" + (href-to + prev)) + (list "ACCESSKEY" + "P")) + (gentext-nav-prev prev)))) + (make element gi: "TD" + attributes: (list + (list "WIDTH" "80%") + (list "ALIGN" "center") + (list "VALIGN" "bottom")) + (nav-context elemnode)) + (make element gi: "TD" + attributes: (list + (list "WIDTH" "10%") + (list "ALIGN" "right") + (list "VALIGN" "bottom")) + (if (node-list-empty? next) + (make entity-ref name: "nbsp") + (make element gi: "A" + attributes: (list + (list "HREF" + (href-to + next)) + (list "ACCESSKEY" + "N")) + (gentext-nav-next next)))))) + (r3-sosofo (make element gi: "TR" + (make element gi: "TD" + attributes: (list + (list "WIDTH" "40%") + (list "ALIGN" "left") + (list "VALIGN" "top")) + (if (node-list-empty? notice) + (literal "Copyright") + (make element gi: "A" + attributes: (list + (list "HREF" + ($legalnotice-link-file$ + (node-list-first notice)))) + (literal "Copyright"))) + (literal " ") + (make entity-ref name: "copy") + (literal " ©rightdate; ") + (make element gi: "A" + attributes: (list + (list "HREF" "mailto:&emailadr;")) + (literal "Thibault Godouet"))) + (make element gi: "TD" + attributes: (list + (list "WIDTH" "20%") + (list "ALIGN" "center") + (list "VALIGN" "top")) + (literal "Fcron &version; ")) + (make element gi: "TD" + attributes: (list + (list "WIDTH" "40%") + (list "ALIGN" "right") + (list "VALIGN" "top")) + (literal "Web page : ") + (make element gi: "A" + attributes: (list + (list "HREF" "&webpageadr;")) + (literal "&webpageadr;")))))) + (if (or r1? r2?) + (make element gi: "DIV" + attributes: '(("CLASS" "NAVHEADER")) + (make element gi: "TABLE" + attributes: (list + (list "SUMMARY" "Header navigation table") + (list "WIDTH" %gentext-nav-tblwidth%) + (list "BORDER" "0") + (list "CELLPADDING" "0") + (list "CELLSPACING" "0")) + (if r1? r3-sosofo (empty-sosofo))) + (make empty-element gi: "HR" + attributes: (list + (list "ALIGN" "LEFT") + (list "WIDTH" %gentext-nav-tblwidth%))) + (make element gi: "TABLE" + attributes: (list + (list "SUMMARY" "Header navigation table") + (list "WIDTH" %gentext-nav-tblwidth%) + (list "BORDER" "0") + (list "CELLPADDING" "0") + (list "CELLSPACING" "0")) + (if r1? r1-sosofo (empty-sosofo)) + (if r2? r2-sosofo (empty-sosofo))) + (make empty-element gi: "HR" + attributes: (list + (list "ALIGN" "LEFT") + (list "WIDTH" %gentext-nav-tblwidth%)))) + (empty-sosofo))))) + + +(element (varlistentry term) + (make sequence + (make element gi: "B" + (process-children-trim)) + (if (not (last-sibling?)) + (literal ", ") + (literal "")))) + +(element emphasis + ;; make role=strong equate to bold for emphasis tag + (if (equal? (attribute-string "role") "strong") + (make element gi: "STRONG" (process-children)) + (make element gi: "EM" (process-children)))) + +(element question + (let* ((chlist (children (current-node))) + (firstch (node-list-first chlist)) + (restch (node-list-rest chlist))) + (make element gi: "DIV" + attributes: (list (list "CLASS" (gi))) + (make element gi: "P" + (make element gi: "A" + attributes: (list (list "NAME" (element-id))) + (empty-sosofo)) + (make element gi: "H3" + (literal (question-answer-label (current-node)) " ") + (process-node-list (children firstch)))) + (process-node-list restch)))) + + + + + + + +