Index: other-projects/the-macronizer/trunk/build.xml
===================================================================
--- other-projects/the-macronizer/trunk/build.xml	(revision 32750)
+++ other-projects/the-macronizer/trunk/build.xml	(revision 32751)
@@ -19,4 +19,5 @@
   <property name="lib.dir.exp"  location="web/WEB-INF/lib" />
   <property name="webinf.dir"  location="web/WEB-INF" />
+  <property name="scripts.dir" location="src/scripts-and-sql" />
   
   <!--
@@ -82,5 +83,4 @@
     <!-- 1. Create the log4j.properties file from its log4j.properties.in template file and put it into the *Macronizer* installation's web/WEB-INF/classes folder -->
     <copy file="${build.dir.exp}/log4j.properties.in" tofile="${build.dir.exp}/WEB-INF/classes/log4j.properties" filtering="true" overwrite="true"/>
-    <copy file="${build.dir.exp}/mysql.properties.in" tofile="${build.dir.exp}/WEB-INF/classes/mysql.properties" filtering="true" overwrite="true"/>
     
     <!-- 2. Create the macronizer.xml tomcat context file from the macronizer.xml.in template file and put it into the correct location in the associated GS3 installation -->
@@ -90,7 +90,46 @@
 	 when necessary. Does nothing if the directory already exist. -->
     <mkdir dir="${build.dir.exp}/logs"/>
+
+    <!-- For the MacroniserFileLogProcessor, which sets up a nightly cron to send useful logging info
+	 from the daily macron.log.<date> files to a mysqldb, need to do some setup too -->
+    <copy file="${build.dir.exp}/mysql.properties.in" tofile="${build.dir.exp}/WEB-INF/classes/mysql.properties" filtering="true" overwrite="true"/>
+    <chmod file="${scripts.dir}/macronLogToDB.bash" perm="ugo+rx"/>
+    <filter token="macronizer.scripts" value="${scripts.dir}"/>
+    <filter token="macronizer.logs" value="${build.dir.exp}/logs"/>
+    <copy file="${basedir}/src/scripts-and-sql/cron.in" tofile="${basedir}/src/scripts-and-sql/cron.txt" filtering="true" overwrite="true"/>
+    
+    <echo>Run the target 'logs-to-db-instructions' for instructions on setting up the MacroniserLogFileProcessor</echo>
   </target>
 
+  <target name="logs-to-db-instructions">
+    <echo>************************************************************
+      Instructions on setting up the MacroniserLogFileProcessor
+      ************************************************************
+      
+      1. Install mysql-5.7.23 as instructed at http://wiki.greenstone.org/doku.php?id=en:user_advanced:greenstonesqlplugs#getting_and_running_mysql
+      (And when you run that mysql installation's db server, shut it down or run its mysql client, do so as per the instructions there)
+
+      2. Use separate terminals to use the above instructions link to:
+        - Start the mysql server
+        - Connect to the mysql client
+      
+      3. After connecting to the client, in the mysql client terminal
+        - IMPORTANT: don't forget to immediately follow with 'set names utf8mb4;'
+        - CREATE AND INITIALISE the Macroniser database and its tables by running the MySQL_Code.sql script by typing the following and hitting ENTER:	
+            source ${scripts.dir}/MySQL_Code.sql
+      
+      3. Edit ${build.dir.exp}/WEB-INF/classes/mysql.properties to set the db password.
+        - If you set up a different username for the mysql db, set that in mysql.properties too.
+        - If nothing is set, MacronLogFileProcessor will assume the username is root.	
+
+      4. Set up the daily cronjob as follows:
+        - open a terminal and type 'export EDITOR=emacs' (or set to the text editor you prefer)
+	- type 'crontab -e' and the editor will open the cronfile
+	- append the contents from ${scripts.dir}/cron.txt to the cronfile
 	
+      ************************************************************
+    </echo>
+  </target>
+  
   <target name="war" depends="build">
     <echo>Basedir: ${basedir}</echo>
Index: other-projects/the-macronizer/trunk/src/scripts-and-sql/cron.in
===================================================================
--- other-projects/the-macronizer/trunk/src/scripts-and-sql/cron.in	(revision 32751)
+++ other-projects/the-macronizer/trunk/src/scripts-and-sql/cron.in	(revision 32751)
@@ -0,0 +1,30 @@
+# Edit this file to introduce tasks to be run by cron.
+# 
+# Each task to run has to be defined through a single line
+# indicating with different fields when the task will be run
+# and what command to run for the task
+# 
+# To define the time you can provide concrete values for
+# minute (m), hour (h), day of month (dom), month (mon),
+# and day of week (dow) or use '*' in these fields (for 'any').# 
+# Notice that tasks will be started based on the cron's system
+# daemon's notion of time and timezones.
+# 
+# Output of the crontab jobs (including errors) is sent through
+# email to the user the crontab file belongs to (unless redirected).
+# 
+# For example, you can run a backup of all your user accounts
+# at 5 a.m every week with:
+# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
+# 
+# For more information see the manual pages of crontab(5) and cron(8)
+# 
+# m h  dom mon dow   command
+
+## Send to /dev/null if you want anything in stdout to disappear
+## (stderr will go to a daily file called macronLogToDB.err)
+#* 0 * * * @macronizer.scripts@/macronLogToDB.bash > /dev/null
+
+## Stdout goes to the .out file and stderr will go to macronLogToDB..err file
+* 0 * * * @macronizer.scripts@/macronLogToDB.out > @macronizer.logs@/macronLogToDB.out
+
Index: other-projects/the-macronizer/trunk/src/scripts-and-sql/cron.txt
===================================================================
--- other-projects/the-macronizer/trunk/src/scripts-and-sql/cron.txt	(revision 32750)
+++ 	(revision )
@@ -1,28 +1,0 @@
-# Edit this file to introduce tasks to be run by cron.
-# 
-# Each task to run has to be defined through a single line
-# indicating with different fields when the task will be run
-# and what command to run for the task
-# 
-# To define the time you can provide concrete values for
-# minute (m), hour (h), day of month (dom), month (mon),
-# and day of week (dow) or use '*' in these fields (for 'any').# 
-# Notice that tasks will be started based on the cron's system
-# daemon's notion of time and timezones.
-# 
-# Output of the crontab jobs (including errors) is sent through
-# email to the user the crontab file belongs to (unless redirected).
-# 
-# For example, you can run a backup of all your user accounts
-# at 5 a.m every week with:
-# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
-# 
-# For more information see the manual pages of crontab(5) and cron(8)
-# 
-# m h  dom mon dow   command
-
-#* 0 * * * /PATH/TO/macronLogToDB.bash > /dev/null
-
-## Stdout goes to the .out file and stderr will go to an .err file
-* 0 * * * /PATH/TO/macronLogToDB.bash > /PATH/TO/macronLogToDB.out
-
