whenever icon indicating copy to clipboard operation
whenever copied to clipboard

Quotes gets replaced by escaped single quotes

Open Herz3h opened this issue 8 years ago • 3 comments

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 ?

Herz3h avatar Aug 08 '17 11:08 Herz3h

As a workaround i used rake tasks instead of runners....

Herz3h avatar Aug 09 '17 07:08 Herz3h

@Herz3h thanks for the report. I just met the same issue with a custom job_type.

thbar avatar Nov 09 '17 14:11 thbar

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"

thec0keman avatar Mar 12 '19 23:03 thec0keman