Commentary in job.scm that explains usage. master
authorTom Balzer <niebieskitrociny@gmail.com>
Sun, 17 Mar 2019 08:44:55 +0000 (03:44 -0500)
committerTom Balzer <niebieskitrociny@gmail.com>
Sun, 17 Mar 2019 08:44:55 +0000 (03:44 -0500)
guile/tomd/job.scm

index 336d767..4b20867 100644 (file)
 ;; You should have received a copy of the GNU General Public License
 ;; along with tomd.  If not, see <http://www.gnu.org/licenses/>.
 
+
+;;; Commentary:
+;;;  job.scm is the guile definition of the job configuration
+;;;  interface that tomd will load on start. The goal of this is to
+;;;  allow for the kernel of the system management to run efficient c
+;;;  code, while the user facing configuration is in extensible and
+;;;  easy to use guile.
+
+;;; Implemented options:
+;;;  :: job-list - the list of jobs that tomd processes on
+;;;                launch. the jobs that are found will started in
+;;;                order, taking into account the different options
+;;;                enabled in their initializers. the processing code
+;;;                runs an embedded guile parser, which in theory
+;;;                allows for the fields to be extended, so long as
+;;;                they evaluate to their intended types. errors in
+;;;                parsing of one job currently will crash the
+;;;                parsing of following jobs, with the error messages
+;;;                being output coming straight from guile. when an
+;;;                error handler is eventually added this problem
+;;;                should vanish.
+;;;  :: create-job - the constructor for a new job definition. each
+;;;                option allowed in this constructor has fall backs
+;;;                so that not all options are mandatory.
+;;;   #:command-line "" - mandatory field that specifies how to launch
+;;;                       a job.
+;;;   #:args (list "")  - optional field that allows for a list of
+;;;                       arguments to be passed on the command-line.
+;;;   #:redirect #f     - optional field that is a boolean to redirect
+;;;                       stdout and stderr to a file in
+;;;                       /var/log/tomd/#:name
+;;;   #:name "default"  - name of the task for use in tomc, log files,
+;;;                       etc. defaults to "default"
+;;;   #:start-trigger   - under work, when tomd should run the
+;;;                       job. can be any of 'login 'logout 'hourly
+;;;                       'boot 'shutdown
+;;;   #:end-trigger     - under work, when tomd should run the
+;;;                       job. can be any of 'login 'logout 'hourly
+;;;                       'boot 'shutdown
+
 (define-module (tomd job)
   #:use-module (srfi srfi-9)
   #:export (create-job make-job