removed mods directory from the ATutor codebase
[atutor.git] / mods / wiki / tools / cron.d / HOWTO
diff --git a/mods/wiki/tools/cron.d/HOWTO b/mods/wiki/tools/cron.d/HOWTO
deleted file mode 100644 (file)
index e593698..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-
-This is an advanced extension; and most people won't need it. It is
-meant for big Wiki installations, where automating tasks makes sense.
-Don't worry if it looks ugly and overly complex or even useless to
-you - it then most likely is.
-
-
-what is it?
-¯¯¯¯¯¯¯¯¯¯¯
-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/u54321/example.com/htdocs/ewiki/tools/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/stdout  \
-     http://example.net/ewiki/tools/cron.d/run-parts.php
-
-Will give you a log of what was run (-O /dev/stdout, cron will mail it
-automatically for correctly configured server accounts).
-
-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 while 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 were 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.
-
-If you really want it, then please just create a file like "S04auth.php"
-and place a link - an include("...") or require statement - to the usual
-'../../fragments/funcs/auth.php' script.
-
-
-numbering scheme
-¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
-The S** ("start") scripts are run in their numeric order,
-the Z** and K** ("kill") scripts get run in reverse order.
-
-The numbering scheme has been designed to group actions into how
-often they are to be executed. The "anacron" scripts and everything
-with two underscores in its name controls this behaviour - it has
-little to do with how the "run-parts.php" script operates.
-
-There are however a few special ranges (subject to change at any
-later time):
-
-  S00-S09  pre-init
-  S10-S19  config
-           - start, preparations
-           - locking, "anacron" stop watch init
-  ---
-  S20-S29  ALWAYS executed
-           - on every run
-  S30-S49  HOURLY run scripts
-           - email2wiki gateway/import
-  S50-S69  DAILY run scripts
-           - creation of cache files,
-           - preparing data for certain plugins
-           - automated page deletion and cache file purging
-          - syncing with other wikis
-  S70-S89  WEEKLY run scripts
-           - collecting statistical info, diffs
-           - sending out mails where users signed on for (RecentNotify
-             and WeekDiff, ...)
-          - exchanging blacklists (spam)
-  S90-S98  MONTHLY run scripts
-           - backups
-  S98,S99  ALWAYS executed
-           - final actions
-  ---
-  Z00-S99  shutdown stuff
-  K00-K99  hard clean-up
-
-There is no requirement that you don't do something completely different
-in any 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.
-
-
-rearrangement tricks (COMPLICATED READING, UNINTERESTING NOTES)
-¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
-If it happens that you want one of the actions in a different time slice
-than it is per default, then you must use a trick if you don't want to
-rearrange the cron.d/ script directory after every update.
-
-For example, if you want S92mimebackup to activate __weekly__ instead of
-__monthly__, you simply make a symlink (get the according utility for
-NT/Win32, or use include-wrapper there) to let's say "S82mybackup.php".
-
-Then you only have to ensure that the "S92mimebackup.php" doesn't actually
-gets activated twice in every fourth week, so you create a "S92_jump93.php"
-script with simply "<?php $GOTO=93; ?>" in it. This will skip the other
-two existing "S92*" parts, because it is sorted (alphabetically) exactly
-before the other two.
-
-  HintTwo: If you needed the "S92binbackup" as well for some obscure
-  reasons, then a name like "S92jump93.php" would do the trick, because it
-  is alphabetically directly in between "...binback" and "...mimebackup".
-  Typically the 'ls -l' directory listing shows exactly how PHPs asort()
-  would order the scripts as well.
-
-Though it's a bit complicated, this should work in most cases. Else you
-could simply create a "mycron/" directory and symlink only the plugins
-you really need and order them however you want. You could also use
-multiple such directories and start each collection by a different cron
-daemon timing rule to achieve the same our "anacron scheduler" script
-parts were meant to.
-