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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -