ruby - whenever gem is not working for every 2 seconds -
i have implemented whenever gem backend crons jobs working when try like
every 2.seconds rake "my:rake:task" end
i error
`parse_time': time must in minutes or higher (argumenterror)
i want run task after every few seconds how can this.
you cannot whenever
gem.
under hood, whenever
gem creates cron
job. these can configured @ minimum granularity of per-minute.
what could instead write shell script infinite loop runs task, , sleeps 2 seconds. however, advise against - running feels wrong. there's cleaner approach, e.g. running code after_save
hook?
Comments
Post a Comment