aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetter Reinholdtsen <pere@hungry.com>2016-04-07 09:50:14 +0200
committerPetter Reinholdtsen <pere@hungry.com>2016-04-07 09:50:14 +0200
commitbc1d32c5f586589f42a1f255e4da54a430b28aa0 (patch)
tree63f927abf9364bc05c90d65a42beb0dddcc665f1
parentf9de0733abd0de5ccc6ac418ebf663b7d88032f8 (diff)
Add wrappers to call scrapers from cron.
-rwxr-xr-xbin/run-daily10
-rwxr-xr-xbin/run-hourly10
2 files changed, 20 insertions, 0 deletions
diff --git a/bin/run-daily b/bin/run-daily
new file mode 100755
index 0000000..a70cb95
--- /dev/null
+++ b/bin/run-daily
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd /srv/scraper/postjournaler
+
+for scraper in $(grep '# Run: daily' scrapersources/*|cut -d: -f1|cut -d/ -f2); do
+ echo
+ echo $scraper
+ echo
+ time ./run-scraper $scraper
+done
diff --git a/bin/run-hourly b/bin/run-hourly
new file mode 100755
index 0000000..bdff6bb
--- /dev/null
+++ b/bin/run-hourly
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd /srv/scraper/postjournaler
+
+for scraper in $(grep '# Run: hourly' scrapersources/*|cut -d: -f1|cut -d/ -f2); do
+ echo
+ echo $scraper
+ echo
+ time ./run-scraper $scraper
+done