diff --git a/README.md b/README.md index 3f2e0b8..101985d 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,13 @@ Use the `get` command to see the data stored in Google, $ python fitsync.py get +### Cron + +The included `cron.sh` script can be used to keep your Fitbit and Google Fit data in sync automatically. +Simply add the following line to your crontab to run the job daily at 11:00. + +`00 11 * * * /path/to/fitsync/cron.sh` + ## See your data To view weight data on [Google Fit](https://fit.google.com), diff --git a/cron.sh b/cron.sh new file mode 100755 index 0000000..0c67fe0 --- /dev/null +++ b/cron.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +pushd $DIR > /dev/null +virtualenv env > /dev/null +source env/bin/activate +./fitsync.py +popd > /dev/null