I have this crontab to run the bash script predictions.sh at a certain time every day. The script does not run in the crontab, but it runs on the ubuntu command line. I am using AWS Ubuntu 16.04.5.
#!/bin/sh -x
SHELL=/bin/bash
PATH=~/bin:~/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin
LANG=en_US.UTF-8
51 14 * * * ./predictions.sh
The bash script itself runs a python file after activating a python environment 'dateprep':
source dataprep/bin/activate
cd dataprep
python datafiles.py
Would any one know how to get the crontab to work? Thank you