#!/bin/sh while true; do if [ -f cusips_to_price.txt ]; then R CMD BATCH --no-restore --no-save ../code/R/build_portfolios.R logs/build_portfolios.Rout & fi if [ -f scenarios.txt ]; then R CMD BATCH --no-restore --no-save ../code/R/build_scenarios.R logs/build_scenarios.Rout if [ $HOSTNAME = "gomez" ]; then pythonexec=python2 elif [ $HOSTNAME = "debian" ]; then pythonexec=python fi $pythonexec ../code/python/intex_scenarios.py >logs/intex_scenarios.out fi sleep 3 done