Forum: Ruby on Rails RailsCron: error message

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
A6ddc3bb7116fb6e13f5ec5f652b56f9?d=identicon&s=25 Van Vo (Guest)
on 2006-02-20 06:12
(Received via mailing list)
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
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 Kyle Maxwell (Guest)
on 2006-02-20 18:30
(Received via mailing list)
On 2/19/06, Van Vo <paintbot@cornsilk.propagation.net> wrote:
> - RailsCron installed as a plug in (not gem, cause I'm on a shared host)
> 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
4d03875f1716626c7e742ca0dd781836?d=identicon&s=25 Joshua Sierles (Guest)
on 2006-02-21 20:17
(Received via mailing list)
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 &"}`
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 Kyle Maxwell (Guest)
on 2006-02-21 21:00
(Received via mailing list)
>   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
869f81abd180f09eafc22a662e5c9d18?d=identicon&s=25 Jake (Guest)
on 2006-02-23 08:31
(Received via mailing list)
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
4bd34a2216dc8bdbf1f017f64e4d59e8?d=identicon&s=25 Kyle Maxwell (Guest)
on 2006-02-23 19:07
(Received via mailing list)
On 2/22/06, Jake <vanguardian@netscape.net> wrote:
> >
> _______________________________________________
> 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
This topic is locked and can not be replied to.