Hi, I''m trying to use RailsCron but keeping getting an error when I try to run it. I''m a beginner, so please use small words :) -bash-2.05b$ rake cron_start (in /home/jake/rails_sites/testsite) Syntax error: "&" unexpected The little bit I know about my environment: - RailsCron installed as a plug in (not gem, cause I''m on a shared host) - Debian Linux - rake cron_status returns nothing - in cron_start, the symbol &> is in the script, but I have no idea how to find out what the symbol means (google doesn''t search symbols well). I believe this & is what it''s choking on, but I don''t know how to confirm. I''ve tried running "ruby script/runner ''RailsCron.start''&", but my test method doesn''t seem to execute. The database does seem to get populated with cron jobs though. How should I go about debugging this? It seems a bit complicated. Any help would be appreciated. Thanks, Jake
On 2/19/06, Van Vo <paintbot@cornsilk.propagation.net> wrote:> Hi, > > I''m trying to use RailsCron but keeping getting an error when I try to run > it. I''m a beginner, so please use small words :) > > -bash-2.05b$ rake cron_start > (in /home/jake/rails_sites/testsite) > Syntax error: "&" unexpected > > The little bit I know about my environment: > - RailsCron installed as a plug in (not gem, cause I''m on a shared host) > - Debian Linux > - rake cron_status returns nothing > - in cron_start, the symbol &> is in the script, but I have no idea how to > find out what the symbol means (google doesn''t search symbols well). I > believe this & is what it''s choking on, but I don''t know how to confirm. > > I''ve tried running "ruby script/runner ''RailsCron.start''&", but my test > method doesn''t seem to execute. The database does seem to get populated > with cron jobs though. > > How should I go about debugging this? It seems a bit complicated. > > Any help would be appreciated. > > Thanks, > Jake > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Are you running from the trunk? If not, can you move to trunk and see if the error is still there? -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261
This still happens - there is a line in the rake tasks file: puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start \" &> /dev/null &"}` Perhaps the & before > was intended to be 2 (to redirect stderr to null) puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start \" 2> /dev/null &"}` On Feb 20, 2006, at 6:25 PM, Kyle Maxwell wrote:> On 2/19/06, Van Vo <paintbot@cornsilk.propagation.net> wrote: >> Hi, >> >> I''m trying to use RailsCron but keeping getting an error when I >> try to run >> it. I''m a beginner, so please use small words :) >> >> -bash-2.05b$ rake cron_start >> (in /home/jake/rails_sites/testsite) >> Syntax error: "&" unexpected >> >> The little bit I know about my environment: >> - RailsCron installed as a plug in (not gem, cause I''m on a shared >> host) >> - Debian Linux >> - rake cron_status returns nothing >> - in cron_start, the symbol &> is in the script, but I have no >> idea how to >> find out what the symbol means (google doesn''t search symbols >> well). I >> believe this & is what it''s choking on, but I don''t know how to >> confirm. >> >> I''ve tried running "ruby script/runner ''RailsCron.start''&", but my >> test >> method doesn''t seem to execute. The database does seem to get >> populated >> with cron jobs though. >> >> How should I go about debugging this? It seems a bit complicated. >> >> Any help would be appreciated. >> >> Thanks, >> Jake >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > Are you running from the trunk? If not, can you move to trunk and see > if the error is still there? > > -- > Kyle Maxwell > Chief Technologist > E Factor Media // FN Interactive > kyle@efactormedia.com > 1-866-263-3261 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails
> puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start > \" &> /dev/null &"}`Try: puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start\"> /dev/null 2>&1 &"}`It''s supposed to send both stdout and stderr to dev/null. -Kyle
Kyle Maxwell <kyle@...> writes:> > > puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start > > \" &> /dev/null &"}` > > Try: > > puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start\" > > /dev/null 2>&1 &"}` > > It''s supposed to send both stdout and stderr to dev/null.________________________________ The error no longer appears for me. Thanks, Jake
On 2/22/06, Jake <vanguardian@netscape.net> wrote:> Kyle Maxwell <kyle@...> writes: > > > > > > puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start > > > \" &> /dev/null &"}` > > > > Try: > > > > puts `#{sudo "nohup ruby script/runner -e #{mode} \"RailsCron.start\" > > > /dev/null 2>&1 &"}` > > > > It''s supposed to send both stdout and stderr to dev/null. > ________________________________ > > The error no longer appears for me. > > Thanks, > Jake > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Great, I''ll modify it in the trunk then... -- Kyle Maxwell Chief Technologist E Factor Media // FN Interactive kyle@efactormedia.com 1-866-263-3261