Doing some ec2 stuff (webservices) in crontab

Just add those lines in front of your crontab file :

 

PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/ec2-user/bin
EC2_HOME=/opt/aws/apitools/ec2
JAVA_HOME=/usr/lib/jvm/java

Publié dans amazon, centos, ec2, linux, tips Tagués avec : , , , ,
Un commentaire sur “Doing some ec2 stuff (webservices) in crontab
  1. Ognjen dit :

    Sorry, but I dont speak chinese.The dlasipy parameter needs to be on the same dlasipy as X is currently running, which is stored in the $DISPLAY environment variable. Unfortunately this variable is not set when running from crontab, so I have just hardcoded :0. To find out where your X is running, type echo $DISPLAY and then use what is written there in the crontab.

Laisser un commentaire

Votre adresse de messagerie ne sera pas publiée. Les champs obligatoires sont indiqués avec *

*