You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by ian tabangay <it...@gmail.com> on 2008/08/27 01:50:13 UTC

Running services on a scheduler

Hi. I have some services that I wish to run on scheduled times but some of
them produces an error since the service requires authentication or the user
to be logged in. Is there a way to work around this problem? Thanks.


~ ian

Re: Running services on a scheduler

Posted by Adrian Crum <ad...@hlmksw.com>.
Use the runAsUser field in JobSandbox.

-Adrian

ian tabangay wrote:
> Hi. I have some services that I wish to run on scheduled times but some of
> them produces an error since the service requires authentication or the user
> to be logged in. Is there a way to work around this problem? Thanks.
> 
> 
> ~ ian
> 

Re: Running services on a scheduler

Posted by jjmbconquista <jj...@yahoo.com.br>.
already try put userLogin into context before call service?

GenericValue userLogin =delegator.findByPrimaryKey("UserLogin",
UtilMisc.toMap("userLoginId","admin"));

        Map input = UtilMisc.toMap("userLogin", userLogin);
        Map serviceResults = dispatcher.runSync("serviceName", input);


ian tabangay-2 wrote:
> 
> Hi. I have some services that I wish to run on scheduled times but some of
> them produces an error since the service requires authentication or the
> user
> to be logged in. Is there a way to work around this problem? Thanks.
> 
> 
> ~ ian
> 
> 

-- 
View this message in context: http://www.nabble.com/Running-services-on-a-scheduler-tp19172460p19185204.html
Sent from the OFBiz - User mailing list archive at Nabble.com.