I was trying to create a cron job which runs a ruby code on digital ocean, however it seems I'm making a mistake. It doesn't give any error but it doesn't also do anything. I ran this cronjob on my raspberry pi however on digital ocean it doesn't work. Here my cronjob
59 17 * * * ruby /home/workspace/delta/analytics/analyze.rb 7 >> /home/testruby
It creates testruby file but analyze.rb 7 doesn't work. I tested running ruby /home/ .... and it is working. What might be the problem?
UPDATE
error file: bin/sh: 1: /usr/local/bin/ruby: not found
This is what I wrote in my crontab
* * * * * /usr/local/bin/ruby /home/workspace/deriva/analytics/analyze.rb 7 >> /home/testruby 2>&1
/
in front (/bin/sh:…
)? Anyway, are you sure that is the right path to Ruby?ls -l /usr/local/bin/ruby
shows it? What aboutcommand -v ruby
?