[Backgroundrb-devel] Unable to make the cron job work

harini iyer harini.r.iyer at gmail.com
Mon Nov 30 14:42:51 EST 2009


I am working on windows. And it appears to me taht certain code follows
syntax for linux. Will this still work for windows?

Thanks,
harini

On Mon, Nov 30, 2009 at 4:24 AM, Lee Hambley <lee.hambley at gmail.com> wrote:

> Harini,
>
> Try Github for the code, perhaps it is newer. Are you running the
> backgroundrb daemon? 'script/backgroundrb start'
>
> -- Lee Hambley
>
> Twitter: @leehambley | @capistranorb
> Blog: http://lee.hambley.name/
> Working with Rails: http://is.gd/1s5W1
>
>
> 2009/11/30 harini iyer <harini.r.iyer at gmail.com>
>
>> Hi,
>>
>> I am a newbie to BDRB and I am kind of stuck. I installed the plugin from
>>
>> svn://rubyforge.org//var/svn/backgroundrb
>>
>> Is there a better place to get the code?
>> And I wrote the following cron job in backgroundrb.yml
>>
>> scheduled_emails:
>>     :class: :EmailingWorker
>>     :job_key: :scheduled_emails
>>     :worker_method: :do_work
>>     :worker_method_args: nil
>>     :trigger_args:
>>       :start: <%= Time.now + 5.seconds %>
>>       :repeat_interval: <%= 5.seconds %>
>>
>> EmailingWorker is my worker class as shown
>>
>> class EmailingWorker < BackgrounDRb::Rails
>>
>>   def do_work(args)
>>     # This method is called in it's own new thread when you
>>     # call new worker. args is set to :args
>>     logger.info('In do_work')
>>     hello_world
>>   end
>>
>>   def hello_world
>>     logger.info('Hello World')
>>   end
>> end
>>
>>
>> When I start the backgroundrb server, nothing gets logged in the
>> backgroundrb.log nor does it throw any errors. Am I missing something here?
>> I am running apache and mysql servers through instant rails. I am really in
>> need of some help here, I have been stuck at this point since 2 days. I
>> would be thankful if someone could point out the mistake that I could be
>> making.
>>
>> Thank You,
>> Harini
>>
>> _______________________________________________
>> Backgroundrb-devel mailing list
>> Backgroundrb-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/backgroundrb-devel
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/backgroundrb-devel/attachments/20091130/86625a17/attachment.html>


More information about the Backgroundrb-devel mailing list