mitchellh/vagrant — Issue #611: how can i use cron in vagrant(box of ubuntu)
Author: jasonchi
Created: 2011-12-30 06:14:41+00:00
State: open

i am using vagrant and created several ubuntu-env with rails, but there is a problem when i use crontab to run tasks of my app:

cron can start and running well,but the tasks are not running currently, i am using mini_magick and tesseract(rtesseract) to parser pictures,and it will come out some error like this:

(There is an exception when converting price for image url:http://price.360buyimg.com/gp365307,3.png, the exception message is:Command ("identify -ping /tmp/mini_magick20111230-6534-1dd1p76-0.jpg") failed: {:status_code=>127, :output=>"sh: identify: not found\n"})

but this error is gone where i use rails console to run tasks.

my cron task:
25 14 * * *cd /home/vagrant/project/virtual_date_/ && rake RAILS_ENV=production capture:update_st