[pmwiki-users] Newsletter throttling

The Editor editor at fast.st
Sun Oct 29 17:49:21 CST 2006


On 10/29/06, Crisses <crisses at kinhost.org> wrote:
>
>> On Oct 29, 2006, at 11:31 AM, The Editor wrote:
>>
>> Next, set cron (I don't really know anything about this, but I think
>> you can use it to run a php script on a schedule?). Cron calls a
>> separate php function that checks for any text files in the queue with
>> a name less than 60 minutes old, retrieves the corresponding message,
>> and mails it out. Then, it deletes that list and quits the function.
>
> PmWiki doesn't require linux or crontab access to run.  It runs sidetasks
> like sending out email announcements on the side when people hit a page on
> the site.
>
> I suggest you look at NotifyPosts, and hook your email sending scripts to
> take advantage of the same mechanisms PmWiki already uses.

I've begun nosing around but not sure I understand how PmWiki triggers
it.  I could perhaps link it to a login script, or any zap function
for that matter.  But what would happen say if no one logged in for
several hours?  It might either send out several hours worth of emails
(breaking my limit) or skip some. (Or I could dynamically rename all
the address files... Yuck.  It might also mean my newsletter might
take days to get out if the traffic were slow.  Am I understanding you
right?

> This means it would remain a viable program on any PHP platform.

I like that, but I am more concerned about reliability in getting out
my mail. To be honest I don't have a good feel for how much traffic my
site is getting so don't know if this would work. Suppose I could put
a markup that does nothing but trigger the action right on the home
page...  That ought to get more hits.  But would that slow down the
site?  Would the page halt the loading until all 100 emails were sent?
 That could be slow.  Or would it work independently.  I guess I don't
understand this process very well.

>> Any thoughts on how this would work?  If it sounds good, I think the
>> only part I would need much help with is actually the cron, and how to
>> run a function in php completely independent of PmWiki.  If I could
>> somehow just set cron to every hour run a specific php function, that
>> could probably do it.  The php doesn't seem too hard unless there's
>> something I'm missing.
>
> Cron is not something a normal user-admin (as opposed to linux admin) would
> want to mess around with.  If people have CPanel/Plesk interfaces it might
> include a nice gui for scheduling.  Not everyone has that type of access --
> so PmWiki needs to run with the assumption that all people have is FTP
> access to their server.  And that's it.

I do have CPanel.  It does have a user interface that is very simple
looking.  The only thing I'm not sure how to do is fill in the line
that says:  command to run.  What do I put there?  A link to the php
function?  An html page that calls the php function?  I dunno...
Something more complex?  Is it really that hard?

Thanks for the advice and input.  Still looking for a solution, one
way or  the other.  Any other thoughts, anyone?  PmWiki could use a
nice newsletter management recipe.

Cheers,
Caveman




More information about the pmwiki-users mailing list