It will start the cron jobs if you provide a database with the -d /
--database option which makes openerp load the selected database (and
thus start the cron for that database)
This is a bit problematic if you have multiple databases of which you
would want the cron to automatically after each restart.
Your script would do fine with just the login alone, the search is a
bit redundant as openerp already loads the entire database when trying
to authenticate your login attempt.
Regards,
Niels
2013/10/25 Ferdinand <office@xxxxxxxxxx <mailto:office@xxxxxxxxxx>>
hello!
starting the openerp server never starts cron jobs etc.
we suggest to add some code like this to the start script which
wakes up all these jobs
the user start has no rights, but connecting
any other sugestion?
**************************
import xmlrpclib
username = 'start' #the user
pwd = 'xxxxx' #the password of the user
dbname = 'yyyyy #the database
# Get the uid
sock_common = xmlrpclib.ServerProxy
('https://localhost:4443/xmlrpc/common')
uid = sock_common.login(dbname, username, pwd)
#replace localhost with the address of the server
sock = xmlrpclib.ServerProxy('https://localhost:4443/xmlrpc/object')
args = [('login', '=', 'admin')] #query clause
ids = sock.execute(dbname, uid, pwd, 'res.users', 'search', args)
print ids
--
Ferdinand
_______________________________________________
Mailing list: https://launchpad.net/~openerp-community
<https://launchpad.net/%7Eopenerp-community>
Post to : openerp-community@xxxxxxxxxxxxxxxxxxx
<mailto:openerp-community@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~openerp-community
<https://launchpad.net/%7Eopenerp-community>
More help : https://help.launchpad.net/ListHelp
--
Niels Huylebroeck
Lead Architect -- Agaplan
Tel. : +32 (0) 93 95 98 90
Web : http://www.agaplan.eu