Thanks.
No, I dont think I have set up aZServer if I have to install it manually. I just set my buildout.cfg. I think that is why it is not running. Then, how can run background jobs? Using system crontab? Or there are some Plone packages to handle this?
as long as you use Python 2, you can set up Plone to use ZServer (instead of WSGI). There is a buildout configuration variable for this -- read the documentation for plone.recipe.zope2instance to find out its name.
you can use the "zeoserver" setup for Plone (there the ZODB data files are not directly controlled by Plone but by a dedicated server (the so called "ZEO server") which coordinates access to them for different Zope processes) and perform background jobs in a dedicated Zope process (likely in a script)
you can use an external scheduling control (i.e. an external cron server) and call appropriate views in Zope via HTTP automation. Operating systems typically come with such a scheduling service ("cron" for *nix like systems).
in principle, the available configuration options differ for Zope with ZServer and Zope with WSGI. That you are able to use the clockserver option may indicate, that you are either using ZServer or that clockserver should work also in a WSGI setup. In the latter case, you would see a Zope bug which you could report in the Zope bug tracker (--> "https://github.com/zopefoundation/Zope`).
If you daemonize inside the python process, that process is started/managed by the wsgi server. Depending on its implementation and running multiple processes, isn’t there the risk of the subprocess getting killed or started multiple times?
ftw.upgrade has an inbuilt feature to call views in a running zope instance by arranging the authorisation through a shared key on file system, for example to call combine_bundles. It would be cool to have this in a separate package.
The drawback of using wget/curl in a cronjob is that you have to provide user/password to the url fetching app