-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathsample-cron
29 lines (19 loc) · 1.2 KB
/
sample-cron
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Copyright (c) 2012 John Krauss
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licences/>
# Edit your crontab using crontab -e , appending the following lines:
# Add the paths containing your wget, pdftotext, and python to the path:
PATH=/path/to/python/env:/path/to/other/bins:${PATH}
# Make sure to subsitute `/path/to/nypd-crash-data-bandaid/' with the actual path.
@daily pushd /path/to/nypd-crash-data-bandaid/ && ./bandaid.sh >> log.txt && popd
# This will run once a day, downloading one file to check whether
# there is new data. If there is, it will download all the files,
# parse them, and place them in a directory for the month.