Skip to content

Instantly share code, notes, and snippets.

@schen1628
Last active May 8, 2016 09:10
Show Gist options
  • Save schen1628/a95fe607b12b28be7641 to your computer and use it in GitHub Desktop.
Save schen1628/a95fe607b12b28be7641 to your computer and use it in GitHub Desktop.
#!/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
@vumc
Copy link

vumc commented May 8, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment