in my config/schedule.rb
:
set :environment, "development"
set :output, "log/cron.log"
every 2.minutes do
rake "reset_expired_pin:generate"
end
then i run whenever --update-crontab --set environment='development'
then crontab -l
i see the cron in that list
and after I refresh my DB every 2 mins, it doesn't update anything ( my rake command not run ),
I have a search on this issue on this StackOverflow and do what the answers said, but doesn't work so i finally ask here to get help,
is wheneever gem
not support on OSX ? and can't be running in development mode ??
i also can't found the log file of that cron , i thought it gonna saved in my rails app root, but it doesn't, i follow this intructions to get log, and i follow this instructions for run whenever
but nothing lucking to find this log in my Mac
crontab -l
:
# Begin Whenever generated tasks for: /Users/me/Documents/myapp/config/schedule.rb at: 2020-05-16 07:12:15 +0800
0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * /bin/bash -l -c
'export PATH="$HOME/.rbenv/bin:$PATH"; eval "$(rbenv init -)"; cd /Users/me/Documents/myapp && RAILS_ENV=development bundle exec rake reset_expired_pin:generate --silent >> log/cron.log 2>&1'
# End Whenever generated tasks for: /Users/me/Documents/myapp/config/schedule.rb at: 2020-05-16 07:12:15 +0800