The scripts in the cron.d/ are to be executed regularily to automatically
do certain administration tasks. Scripts that shall be executed MUST have
a name like "Snn______.php" to be detected by the "run-parts.php" script.

Put all the configuration setting into run-parts.php, or simply create a
"S02myconfig.php" to override settings from all the other snippets (which
all too often are disabled per default). You can get a list of all possible
config settings with `grep define * | sort | uniq ` or so.

Coding is less clean than in ewiki, but works for what is to be achieved.


how often?

It is recommended that you activate the run-parts every day, if you can
automate this via a cron daemon. But running them once a week (or depending
on activity on your wiki even rarer) would do too.

There is an internal dispatcher ("anacron") which ensures that certain
parts are run only once a week/month anyhow, so it doesn't hurt if this
got triggered hourly or so.


local cron activation

If your provider gives you shell access and a real cron service, then
use this to get your cron scripts running (use "EDITOR=joe crontab -e"
on the commandline):

00 03 * * 5	\
    php -q /www/u7654321/example.com/htdocs/ewiki/cron.d/run-parts.php

(will run everything on Fridays at 03:00 - once a week is enough for
most tasks)


remote cron activation

If you have a cron daemon running somewhere, then you can start the cron
scripts in here with it too, by simply setting up a remote activation
with wget:

00 03  * * *	\
     wget -o /dev/null -O /dev/null	\
     http://example.net/ewiki/tools/cron.d/run-parts.php

There are also free services which provide this form of web based
cron activation.


Using plugins/feature/anacron.php

If you seriously can't get a real cron service, then use your Windows
box` built-in task planner! ;)

No seriously, you can then simply use the script we provide as "anacron"
extension. It hooks into ewiki and enables itself once a day, whenever
a person or a search engine or spam bot visits your site. It does not
delay page delivery by that, because it runs after the page has been
finished.

It is highly recommended to use this, but as usual you can forget it if
your provider has no PHP installed and only gives you "Safe-Mode-PHP".


Or even starting by hand

If there is not all that much activity on your Wiki, you may even want
to start the scripts yourself every once in a month or so. Just point
your browser to the directory, the index.php script will show up a form
which eases starting. (This is only made so we can add an entry on the
admin tools/ overview page.)


password protection

There is no need to "protect" these scripts from getting run by anyone.
Nobody can do you harm if he activates it, because the tools herein
run automated and do only what they are configured to do and don't
accept commands from outside. Also they run locked, cannot be interrupted
once started and then typically don't slow down the server any much.


numbering scheme

The S** ("start") scripts are run in their numeric order,
the Z** and K** ("kill") scripts get run in reverse order.

Currently we use the ranges as follows (subject to change at any
later time):

  S00-S09  pre-init
  S10-S19  config start, preparations
  -
  S20-S29  ...
  S30-S39  ...
  S60-S69  automated page deletion and cache file purging
  S65-S69  creation of cache files,
           preparing data for certain plugins
  S50-S59  ...
  S70-S79  ...
  S80-S89  collecting statistical info, diffs, sending out mails,
           which users signed on for (RecentChanges, WeekDiff)
  -
  S95-S99  finishing
  -
  Z00-S99  shutdown stuff
  K00-K99  hard clean-up

There is no requirement, that you don't do something else in every
stage as you see fit. And you can have two different files with the
same numeric entry - in that case you just didn't know 102%-exactly
which one of the two was started first.


NOTE: Ordering and anacron will probably get adjusted to support
different count sets here - separating actions that will be executed
hourly from those that run only once a day, or even once a week, once
in a month.


 