I wrote a rake task which executes from command line and not from cronjob.
I wrote a task which internally calls model method, so suppose my task name is dataimport so if I call as
rake db:dataimport
it works, and create records in database. But when I want execute it for every 10 seconds I putin crontab as
* * * * * sleep 10; cd $APP_DIR/lib/tasks; rake db:dataimport
this doesn't work.Any suggestions on this.