Persist variables to file (~/.whenjobs/variables).
[whenjobs.git] / daemon / whenjobsd.pod
1 =encoding utf8
2
3 =head1 NAME
4
5 whenjobsd - whenjobs per-user daemon
6
7 =head1 SYNOPSIS
8
9  whenjobsd
10
11 To start the daemon as a user, do:
12
13  whenjobs --daemon-start
14
15 To start the daemon as root (eg. from C</etc/rc.local>) for a
16 particular user called C<username> do:
17
18  su username -c /usr/sbin/whenjobsd
19
20 =head1 DESCRIPTION
21
22 C<whenjobsd> is the daemon that runs whenjobs.  Normally users do not
23 need to run this program directly.  You can start and stop the daemon
24 using the L<whenjobs(1)> tool:
25
26  whenjobs --daemon-start
27  whenjobs --daemon-stop
28  whenjobs --daemon-status
29  whenjobs --daemon-restart
30
31 All documentation on the whenjobs cron replacement system can be found
32 in the L<whenjobs(1)> man page.  This man page documents the daemon
33 only.
34
35 Unlike cron, each user that wants to use whenjobs runs their own
36 whenjobsd.  They operate completely separately.
37
38 The daemon sends log messages to syslog using the "cron" facility.
39 Where these end up depends on the configuration of your syslog system,
40 which can vary from Linux distro to Linux distro.  Typically the file
41 to look at might be one of:
42
43  /var/log/cron
44  /var/log/syslog
45  /var/log/messages
46
47 =head1 OPTIONS
48
49 =over 4
50
51 =item B<-d>
52
53 Enable extra debugging messages.  These are sent to syslog.
54
55 =item B<-f>
56
57 Don't fork into the background.
58
59 =item B<-V>
60
61 =item B<--version>
62
63 Display the name and version of the program and exit.
64
65 =item B<-help>
66
67 =item B<--help>
68
69 Display brief usage and exit.
70
71 =back
72
73 =head1 FILES
74
75 =over 4
76
77 =item C<$HOME/.whenjobs/daemon_pid>
78
79 This contains the process ID of the daemon.  The daemon also holds an
80 advisory (L<flock(2)>-style) exclusive lock on this file while it is
81 running.
82
83 =item C<$HOME/.whenjobs/jobs__*.cmo> (bytecode daemon)
84
85 =item C<$HOME/.whenjobs/jobs__*.cmxs> (native code daemon)
86
87 The compiled jobs specification file which the daemon loads on start
88 up, or reloads when instructed to by the L<whenjobs(1)> tool.
89
90 The source jobs ml file(s) are compiled down to a single module with a
91 random name (each source file is a submodule).  Only the highest
92 numbered file is loaded; the others are assumed to be earlier versions
93 and deleted.
94
95 See also L<whenjobs(1)/MULTIPLE JOBS FILES>.
96
97 =item C<$HOME/.whenjobs/socket>
98
99 The daemon creates this socket and listens for incoming connections
100 from the L<whenjobs(1)> tool.
101
102 =back
103
104 =head1 ENVIRONMENT VARIABLES
105
106 =over 4
107
108 =item C<$HOME>
109
110 The user's home directory.  This directory must exist and must be
111 owned by the same user as the daemon.
112
113 =item C<$SHELL>
114
115 The shell used to execute shell scripts.  If not set, C</bin/sh> is
116 used.
117
118 =back
119
120 =head1 SEE ALSO
121
122 L<whenjobs(1)>
123
124 =head1 AUTHOR
125
126 Richard W.M. Jones L<http://people.redhat.com/~rjones/>
127
128 =head1 COPYRIGHT
129
130 Copyright (C) 2012 Red Hat Inc.
131
132 This program is free software; you can redistribute it and/or modify
133 it under the terms of the GNU General Public License as published by
134 the Free Software Foundation; either version 2 of the License, or
135 (at your option) any later version.
136
137 This program is distributed in the hope that it will be useful,
138 but WITHOUT ANY WARRANTY; without even the implied warranty of
139 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
140 GNU General Public License for more details.
141
142 You should have received a copy of the GNU General Public License
143 along with this program; if not, write to the Free Software
144 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.