Skip to content
Go to file
Cannot retrieve contributors at this time
executable file 18 lines (13 sloc) 596 Bytes
#set env vars for cron job
# this script creates /opt/tier/env.bash which is sourced by the cron job's script, which was not seeing the environment set by the Dockerfile
#build crontab file with random start time between midnight and 3:59am
echo "#send daily beacon to TIER Central" > ${CRONFILE}
echo $(expr $RANDOM % 59) $(expr $RANDOM % 3) "* * * /usr/local/bin/ >> /var/log/cron.log 2>&1" >> ${CRONFILE}
chmod 644 ${CRONFILE}
#install crontab
crontab ${CRONFILE}
#create cron logfile
touch /var/log/cron.log
You can’t perform that action at this time.