-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcron.sh
executable file
·16 lines (15 loc) · 1.11 KB
/
cron.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
echo export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID >> .env
echo export AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY >> .env
echo export DATABASE_URL=$DATABASE_URL >> .env
echo export PATH=$PATH:/usr/local/bin >> .env
echo export S3_DUMP_BUCKET=$S3_DUMP_BUCKET >> .env
echo export S3_TEMPLATE=$S3_TEMPLATE >> .env
echo export MAPBOX_ACCOUNT=$MAPBOX_ACCOUNT >> .env
echo export MAPBOX_ACCESS_TOKEN=$MAPBOX_ACCESS_TOKEN >> .env
echo '* 12 * * * . /opt/app/.env; cd /opt/app; ./scripts/make-network.sh >> make-network.log 2>&1' | crontab -
(crontab -l; echo '* */24 * * * . /opt/app/.env; cd /opt/app; ./scripts/make-analysis-and-display.sh >> make-analysis-and-display.log 2>&1') | crontab -
(crontab -l; echo '* */24 * * * . /opt/app/.env; cd /opt/app; ./scripts/generate-tasks.sh >> generate-tasks.log 2>&1') | crontab -
(crontab -l; echo '* */20 * * * . /opt/app/.env; cd /opt/app; ./scripts/generate-provincial-dumps.sh >> generate-provincial-dumps.log 2>&1') | crontab -
(crontab -l; echo '* */24 * * * . /opt/app/.env; cd /opt/app; ./scripts/make-full-backup.sh >> make-full-backup.log 2>&1') | crontab -
cron start -f