So by this do you mean using...
http://code.google.com/appengine/docs/java/config/cron.html?

The second part is interesting but does that mean every time a user
removes the bot you have to remove that wave ID from your data store?

On Nov 30, 4:01 pm, Raphaël Pinson <raph...@gmail.com> wrote:
> Hi Fabrizio,
>
> On Mon, Nov 30, 2009 at 2:54 PM, fabrizio-mc <fporci...@gmail.com> wrote:
> > I want to use the cron event to periodically syncronize the wave where
> > I put my robot with an external app. The need is to add a simple text
> > blip in the wave for each action registered from the external app.
>
> > I use Java.
>
> > I have two questions:
>
> > 1. I have seen that my robot cron event starts regularly if the robot
> > is placed in a single wave (for example every 30 secs). But if I put
> > the robot in two or more waves I can see only one call and not one
> > call for each wave.. Is it correct?
>
> I have not tried the cron myself, but it just seems like a standard
> cron, which calls your bot regularly, independently from any Wave
> modification, so it makes sense that it gets called only once every
> period of time.
>
>
>
> > 2. To use cron and update my waves I found and use this code:
>
> >        ....
> >        if (bundle.getEvents().size() == 0) {
> >          LOG.warning("Cron event now");
> >        ....
>
> > and it's works (i can see the log in appengine) but when I try to get
> > the wavelet and append my message:
>
> >          Wavelet wavelet = bundle.getWavelet();
> >          Blip blip = wavelet.appendBlip();
> >          TextView textnew = blip.getDocument();
> >          textnew.append("30 secs message...");
>
> > the function getWavelet() value is NULL.
> > How can I get wavelet data from wave who contains the robot instance?
>
> In the cron, the bot is not associated to any wave/wavelet/blip, so
> the best way for you to update your waves is probably this :
> * whenever the bot is called from an event, store the
> wave/wavelet/blip IDs in the datastore
> * when the bot is called from cron, get the IDs of all the waves that
> the bot is added to from the datastore and update them. I think you
> should be able to access a wave by its ID.
>
> Regards
>
> Raphaël

--

You received this message because you are subscribed to the Google Groups 
"Google Wave API" group.
To post to this group, send email to google-wave-...@googlegroups.com.
To unsubscribe from this group, send email to 
google-wave-api+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-wave-api?hl=en.


Reply via email to