I have a rails 3.2 app that uses ruby 1.9.3
We need to have a cron job run through container_commands.
Currently I have a common.config
file in the .ebextensions
directory with the following in it
container_commands:
04_clear_old_epubs:
command: "cat .ebextensions/clear_old_epubs_cron.txt > /etc/cron.d/clear_old_epubs_cron && chmod 644 /etc/cron.d/clear_old_epubs_cron"
leader_only: true
Then in the clear_old_epubs_cron.txt
file I have
*/5 * * * * root /usr/bin/php rm -rf /var/app/current/public/epub-download-1/* > /dev/null
#
I got this from the accepted answer in AWS Elastic Beanstalk, running a cronjob
The cron doesn't clear the folder like it's meant to. Not sure what is stopping the cron from running or if it is running but something else is wrong.
Can anyone see something that wrong or missing?