Ok,
But how should it be done?
robot.RegisterCronJob('/cron', 60) is enough in python?
And then it will call /cron every 60 secs .. or /_wave/cron ?
On 3 nov, 16:53, Wookai <[email protected]> wrote:
> I got my script to be called by thecron(it took some time, tough, it
> seems that thecronsection in capabilities.xml is not detected right
> away), but I get the same error as Andre. As allcronrobots are
> broken (tweety does not work for me either), I guess there is a
> problem with thiscronfeature.
>
> If you only need to do some internal stuff, you'll be fine, but if you
> need the context to update some waves, you're out of luck.
>
> However, I've read several times from the Wave team that they're
> working on an 'automated tasks' feature that will make thesecron
> calls obsolete. Let's see if someone can comment on that (and maybe
> give us an ETA...) !
>
> On Nov 2, 8:46 am, Jeroen van Wissen <[email protected]>
> wrote:
>
> > Did you manage to have it working ?
> > I'd like to know how you got your script working that thecronjob is
> > called... coz I can't find any working example.
> > Mycron'swon't get called :S
>
> > On Oct 5, 9:26 pm, André <[email protected]> wrote:
>
> > > I've since configured thecronjob and my code is called, but I can't
> > > parse the context in order to return some action. The code I have is
> > > this:
>
> > > json_body = sys.stdin.read()
> > > context, events = robot_abstract.ParseJSONBody(json_body)
>
> > > This is what comes in the wire:
>
> > > Incoming: {"blips":{"map":
> > > {},"javaClass":"java.util.HashMap"},"robotAddress":"[email protected]","events":
> > > {"javaClass":"java.util.ArrayList","list":[]},"wavelet":null}
>
> > > This is the error I get:
>
> > > <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute
> > > 'get'
> > > Traceback (most recent call last):
> > > File "/base/data/home/apps/ajustestransparentes/1.336796539236639238/
> > > wakeup.py", line 23, in <module>
> > > context, events = robot_abstract.ParseJSONBody(json_body)
> > > File "/base/data/home/apps/ajustestransparentes/1.336796539236639238/
> > > waveapi/robot_abstract.py", line 37, in ParseJSONBody
> > > context = ops.CreateContext(data)
> > > File "/base/data/home/apps/ajustestransparentes/1.336796539236639238/
> > > waveapi/ops.py", line 598, in CreateContext
> > > context.AddWavelet(data['wavelet'])
> > > File "/base/data/home/apps/ajustestransparentes/1.336796539236639238/
> > > waveapi/ops.py", line 539, in AddWavelet
> > > wavelet = OpBasedWavelet(wavelet_data, self)
> > > File "/base/data/home/apps/ajustestransparentes/1.336796539236639238/
> > > waveapi/ops.py", line 127, in __init__
> > > super(OpBasedWavelet, self).__init__(json)
> > > File "/base/data/home/apps/ajustestransparentes/1.336796539236639238/
> > > waveapi/model.py", line 92, in __init__
> > > self.creator = json.get('creator')
>
> > > I've seen this error mentioned before
> > > herehttp://code.google.com/p/wave-robot-python-client/issues/detail?id=11
> > > but I'm not sure if this is a server problem or a problem in the
> > > python API, or both.
>
> > > André
>
> > > On Oct 4, 1:22 am, André <[email protected]> wrote:
>
> > > > Hello.
>
> > > > I'm looking for an example of a python robot which uses thecron
> > > > facility to periodically update a wave. Is there one?
>
> > > > Is this already supported? I noticed theRegisterCronJob() call but
> > > > this takes a path as a parameter... Do we have to implement a handler
> > > > at another URL? What are we passed so that we can update a wavelet?
>
> > > > Best regards,
> > > > André Cruz
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Wave API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-wave-api?hl=en
-~----------~----~----~----~------~----~------~--~---