iangow / se_core

Core code for StreetEvents data
7 stars 5 forks source link

Move `rsync` to separate code. #6

Closed iangow closed 5 years ago

iangow commented 5 years ago

Also put in a cron job.

@danielacarrasco We discussed this. I may need to help you with this one.

iangow commented 5 years ago

OK, so I made a file se_core_rsync that sites in /etc/cron.daily and contains the following:

#!/usr/bin/env bash
export SE_DIR=/home/shared/uploads/
export ID=iangow
rsync -avz $ID@45.113.235.201:/home/thomsonreuters/uploads/ $SE_DIR

I added this line to the bottom of the file I see if I type crontab -e at the command line:

0 14 *  * * /etc/cron.daily/se_core_rsync

It seems to be working!