How to set crontab when using AWS CloudFormation Userdata?
I am setting
(crontab -l ; echo \"0 * * * * wget -O - -q http://www.example.com/cron.php\") |
To do this properly you should do the following inside the bash script:
crontab -l > /tmp/mycrontab echo '0 * * * * wget -O - -q http://www.example.com/cron.php' >> /tmp/mycrontab crontab /tmp/mycrontab