Last active
May 8, 2016 09:10
-
-
Save schen1628/a95fe607b12b28be7641 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -v | |
yum install -y python26-pip gcc | |
pip install croniter | |
OPERATOR=/home/ec2-user/ec2_operator.py | |
wget -O $OPERATOR https://raw.githubusercontent.com/schen1628/ec2/master/ec2_operator.py | |
chown ec2-user:ec2-user $OPERATOR | |
chmod 644 $OPERATOR | |
echo "*/5 * * * * ec2-user python $OPERATOR" >> /etc/crontab |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
script TZ factor: add before line# 9
set default = UTC or can be user-defined
echo "CRON_TZ= " >> /etc/crontab
echo "*/5 * * * * ec2-user python $OPERATOR" >> /etc/crontab