whenever
whenever copied to clipboard
Quotes gets replaced by escaped single quotes
Hello,
Using rails 5.0.2, ruby-2.3.0 [ x86_64 ] and whenever (gem 'whenever', :require => false), my quotes are replaced by escaped single quotes.
When i do :
every 1.minute do
runner "Subscription.end_trials" # or 'Subscription.end_trials"
end
I get this in the cron regardless if i use simple quote or double quotes to surround the method i want to run :
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 'cd /root/authserver && bundle exec bin/rails runner -e development '\''Subscription.end_trials'\'''
Any idea ?
As a workaround i used rake tasks instead of runners....
@Herz3h thanks for the report. I just met the same issue with a custom job_type.
A bit of an old issue, but we're running into this too. This seems to work:
job_type :runner, "cd :path && bin/rails runner -e :environment \":task\" :output"