time-delayed emails to a mailing list

Christopher Browne cbbrowne-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Sun Oct 9 00:08:32 UTC 2005


On 10/8/05, Emma Jane Hogbin <emmajane-MHIYrZpDPrNWk0Htik3J/w at public.gmane.org> wrote:
> I'm working on a project right now that requires me to send out "daily
> prompts" to a set of participants. My preference is to send the emails via
> mailman so that I've got all the subscriber management tools; however, I'm pretty
> sure that mailman won't let me set a month's worth of messages and then
> set the dates that the emails are sent out on. I can write a little shell
> script to have a message sent to mailman at specified times/dates but I'd
> like to have a nice little GUI interface to add/edit the messages. Before
> I go ahead and write my own, does anyone know if something like this
> already exists?

At "first blush," this sounds like a perfect task for cron.  Alas, no
*direct* GUI for that :-(.

At "second blush," this sounds like "pgjob"
<http://pgfoundry.org/projects/pgjob/>.  The idea of that is to define
a schema and some tools for constructing something akin to cron that
stores jobs as a set of database tuples.  There are several merits of
that approach, over "traditional cron":

1.  You can define more sophisticated semantics as to when jobs should
execute, as well as to seqencing of jobs.

2.  Sticking it in a database eliminates the need for Yet Another
Language Parser for yet another file format

3.  You can do more extensive logging of the results than cron does,
and perhaps even allow jobs to point to one another

4.  Using a DBMS for storage means that it's already multiuser
capable, and it is easy to allow additional processes to, in an
automated fashion, read and write job information

The result of this might simply be that you have a daemon and/or cron
job that wakes up once every minute or so to check what jobs need to
be run, and that "controller" job might be a gratifyingly simple shell
script...

A third approach that comes to mind is to Use Another Existing Scheme,
namely that of cfengine.  It has a way of defining timeframes when
events should be invoked.

For instance...  A rule might look thus:

(Hr01|Hr03|Hr07)::(Min00_05|Min05_10)::(Monday|Tuesday)::
  "/home/cbbrowne/scripts/something_to_run_at_137_00-10_onMonAndTues.sh"

Unfortunately, I think what this would require is that you start by
defining the DB schema and then have a process that builds the
cfengine script.  Modifications would have to take place in the
database, not by hacking the script...

In any case, the "magic" in all of these cases is in building that
"nice little GUI interface."

If someone were to build a decent DBMS-based scheduler, people would come...
--
http://www3.sympatico.ca/cbbrowne/linux.html
"The true  measure of a  man is how he treats  someone who can  do him
absolutely no good." -- Samuel Johnson, lexicographer (1709-1784)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list