I'm struggling trying to make a cron job run. Here is what I have:
*/1 * * * * cd /home/jose/work/Cronox/lib/tasks/rake wines:destroy_wines >> /home/jose/crontab_errors.txt
My task looks like this:
namespace :wines do
desc "delete all wines"
task :destroy_wines => :environment do |t|
Wine.delete_all!
end
end
If I use this command: tail -f /var/log/syslog I can see this:
(jose) CMD (cd /home/jose/work/Cronox/lib/tasks/rake wines:destroy_wines >> /home/jose/crontab_errors.txt)
Every minute, But it does nothing at all. I'm also using rvm Does that have anything to do with it?
One more thing: when executed manually the task works fine.
What am I missing,
please, please help me !