Hope file attached with this mail may help you in installing clockserver.

Rajasekhar.

On Sun, Dec 28, 2008 at 7:18 PM, Garry Saddington <
ga...@schoolteachers.co.uk> wrote:

> On Sunday 28 December 2008 12:33, Andreas Jung wrote:
> > On 27.12.2008 21:23 Uhr, Garry Saddington wrote:
> > > Does anyone know of a time/cron server for Zope that works. I want to
> be
> > > able to schedule a script to run every hour or so?
> > > Regards
> >
> > Zope has a build-in ClockServer.
> >
> > -aj
> Great, where can I find documentation to use it?
> Regards
> Garry
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
Document Actions

    * English
    * Español

Send this page to somebody Print this page
ClockServer 0.2 for Zope 2.9

The Zope ClockServer product provides a mechanism for users to call Zope object 
methods without the use of an external clock source (e.g. cron/wget). It 
operates by acting as a medusa "server", essentially coopting Zope's asyncore 
mainloop and injecting "fake" requests into Zope's ZPublisher. Despite the 
complicated description, it's rather easy to use.

Installing with buildout

If you are using buildout to manage your instance installing ClockServer is 
very simple. You can install it by adding it to the eggs line for your instance:

[instance]
eggs = Products.ClockServer

If another egg package depends on Products.ClockServer you do not need to 
specify anything in the buildout configuration: buildout will detect this 
automatically.

After updating the configuration you need to run the ''bin/buildout'', which 
will take care of updating your system.
Installing without buildout

Move (or symlink) the ClockServer folder of this project 
(Products.ClockServer/Products/ClockServer) into the Products directory of the 
Zope instance it has to be installed for, and restart the server.

You may also download a traditional tarball that you unpack into Products from 
here.

Configuring Your Zope Instance to Use the ClockServer Product

In order to allow you to use the "clock-server" directive  place the following 
lines in the [instance] section of your buildout configuration "buildout.cfg" 
file:

[instance]
....
....
zope-conf-additional=
      %import Products.ClockServer
      <clock-server>
          method /do_stuff
          period 60
          user admin
          password 123
          host localhost
       </clock-server>

The "clock-server" should be beneath the import line and define the script to 
be run and of often, /do_stuff every 60 seconds in this case.  Any number of 
clock-server sections may be defined within a single zope.conf. Note that you 
must specify a username/password combination with the appropriate level of 
access to call the method you've defined. Then you need to update your 
buildout's environment, to do that just run:

$ bin/buildout -v

Descriptions of the values within the clock-server section follow:

method
    the traversal path (from the Zope root) to an executable Zope method 
(Python Script, external method, product method, etc). The method must take no 
arguments.
period
    the number of seconds between each clock "tick" (and thus each call to the 
above "method"). The lowest number providable here is typically 30 (this is the 
asyncore mainloop "timeout" value).
user
    a zope username.
password
    the password for the zope username provided above.
host
    the hostname passed in via the "Host:" header in the faux request. Could be 
useful if you have virtual host rules set up inside Zope itself.

Making Sure the Clock Is Working

Examine your Z2.log file. It should show requests incoming via a "Zope Clock 
Server" useragent.

About ClockServer

    * Author: Chris McDonough <chrism at plope com>
    * Original product page: http://plope.com/software/ClockServer/
    * ClockServer for Zope 2.9 maintainer: Roberto Allende <rover at menttes 
com>
    * License: ZPL 2.1
    * Platform: Zope 2.9 


_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to