Skip to content
Snippets Groups Projects
Commit aff1a009 authored by Your Name's avatar Your Name
Browse files

generic

parent 4146ba9d
No related branches found
No related tags found
No related merge requests found
# 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 0 7 * * /bin/bash -c '/home/extractor/schedule/generic-release.sh' >/dev/null 2>&1
#!/bin/bash
EXTRACTIONFRAMEWORK="/home/extractor/extraction-framework"
DATABUSMAVENPLUGIN="/data/extraction/databus-maven-plugin/dbpedia/generic"
LOGS=
downloadOntology() {
echo " (date) | extraction-framework | start download ontology" >&2;
cd $EXTRACTIONFRAMEWORK/core;
../run download-ontology;
}
downloadMappings() {
echo "$(date) | extraction-framework | start download mappings" >&2;
cd $EXTRACTIONFRAMEWORK/core;
../run download-mappings;
}
downloadDumps() {
echo "$(date) | extraction-framework | start download dumps" >&2;
cd $EXTRACTIONFRAMEWORK/dump;
../run download download.spark.properties;
}
buildExtractionFramework() {
echo "$(date) | extraction-framework | mvn clean install" >&2;
cd $EXTRACTIONFRAMEWORK;
mvn clean install;
}
runExtraction() {
echo "$(date) | extraction-framework | start extraction" >&2;
cd $EXTRACTIONFRAMEWORK/dump;
../run sparkextraction extraction.spark.properties;
}
prepareRelease() {
echo "$(date) | databus-maven-plugin | collect extracted datasetes" >&2;
cd $DATABUSMAVENPLUGIN;
./collectExtraction.sh;
}
deployRelease() {
echo "$(date) | databus-maven-plugin | mvn package" >&2;
cd $DATABUSMAVENPLUGIN;
mvn package;
echo "$(date) | databus-maven-plugin | mvn databus:deploy" >&2;
mvn databus:deploy;
}
main() {
echo "--------------------"
echo " Generic Extraction "
echo "--------------------"
downloadOntology;
downloadMappings;
downloadDumps;
buildExtractionFramework;
runExtraction;
prepareRelease;
deployRelease;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment