[OFBiz] Users - How to use the Job Scheduler

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[OFBiz] Users - How to use the Job Scheduler

deepak sahu
Hello Everyone,
I am using OFBiz (version 5027) on Windows 2000.
I have a requirement of running a particular piece of job after every 15 days.
I came across the Job Scheduler feature of OFBiz and I think this is
what I should use.

After going through this list and the code in Order application I
understand that to use a scheduled job I need to add
MyAppScheduledServices.xml and make an entry in the
ofbiz-component.xml of MyApp.

Basically I copied the ProductScheduledServices.xml into MyApp\data
and made required changes. I gave unique values for the
recurrenceRuleId,recurrenceInfoIdand jobId. I gave the startDateTime
as 2005-07-22 00:00:00.000 and runTime as 2005 07-22 15:00:00.000.
I specified a service which has a System.out.println statement. Next I
restarted the server and waited for the service to be called. I got
nothing.
I checked the JobSandbox entity with webtools but didn't find any
entry for my service.

Can anybody plz tell me what I am missing?
I would really appreciate some help.

With Regards,
Deepak
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - How to use the Job Scheduler

David E. Jones

You can't just put data into Entity Engine XML files, they must be  
loaded through either the install process or the XML Import pages in  
the WebTools webapp.

-David


On Jul 22, 2005, at 10:00 AM, deepak sahu wrote:

> Hello Everyone,
> I am using OFBiz (version 5027) on Windows 2000.
> I have a requirement of running a particular piece of job after  
> every 15 days.
> I came across the Job Scheduler feature of OFBiz and I think this is
> what I should use.
>
> After going through this list and the code in Order application I
> understand that to use a scheduled job I need to add
> MyAppScheduledServices.xml and make an entry in the
> ofbiz-component.xml of MyApp.
>
> Basically I copied the ProductScheduledServices.xml into MyApp\data
> and made required changes. I gave unique values for the
> recurrenceRuleId,recurrenceInfoIdand jobId. I gave the startDateTime
> as 2005-07-22 00:00:00.000 and runTime as 2005 07-22 15:00:00.000.
> I specified a service which has a System.out.println statement. Next I
> restarted the server and waited for the service to be called. I got
> nothing.
> I checked the JobSandbox entity with webtools but didn't find any
> entry for my service.
>
> Can anybody plz tell me what I am missing?
> I would really appreciate some help.
>
> With Regards,
> Deepak
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - How to use the Job Scheduler

deepak sahu
Hello David,
What "install process" are you referring to?
Are you referring to the following snippet:

long startTime = new java.util.Date().getTime();
 int frequency = RecurrenceRule.DAILY;
 int interval = 1;
 int count = 20;
 LocalDispatcher dispatcher=dctx.getDispatcher();
 dispatcher.schedule("myService",_context, startTime, frequency,
interval, count);
         }catch (GenericServiceException e){
 Debug.logError("Error trying to Schedule Recurring payment Service: "
+ e.getMessage());
        }

Can you tell me where/how should I use the above snippet?

Deepak

On 7/22/05, David E. Jones <[hidden email]> wrote:

>
> You can't just put data into Entity Engine XML files, they must be
> loaded through either the install process or the XML Import pages in
> the WebTools webapp.
>
> -David
>
>
> On Jul 22, 2005, at 10:00 AM, deepak sahu wrote:
>
> > Hello Everyone,
> > I am using OFBiz (version 5027) on Windows 2000.
> > I have a requirement of running a particular piece of job after
> > every 15 days.
> > I came across the Job Scheduler feature of OFBiz and I think this is
> > what I should use.
> >
> > After going through this list and the code in Order application I
> > understand that to use a scheduled job I need to add
> > MyAppScheduledServices.xml and make an entry in the
> > ofbiz-component.xml of MyApp.
> >
> > Basically I copied the ProductScheduledServices.xml into MyApp\data
> > and made required changes. I gave unique values for the
> > recurrenceRuleId,recurrenceInfoIdand jobId. I gave the startDateTime
> > as 2005-07-22 00:00:00.000 and runTime as 2005 07-22 15:00:00.000.
> > I specified a service which has a System.out.println statement. Next I
> > restarted the server and waited for the service to be called. I got
> > nothing.
> > I checked the JobSandbox entity with webtools but didn't find any
> > entry for my service.
> >
> > Can anybody plz tell me what I am missing?
> > I would really appreciate some help.
> >
> > With Regards,
> > Deepak
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
> >
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - How to use the Job Scheduler

David E. Jones

No, I'm not sure what that is. The install process I'm referring to  
gets the seed data into the database, usually with "ant run-install"  
or some such.

For more information, look at the Setup Guide or Basic Production  
Setup Guide. Both are linked to on the Docs & Books page of the  
ofbiz.org site.

-David


On Jul 24, 2005, at 11:15 PM, deepak sahu wrote:

> Hello David,
> What "install process" are you referring to?
> Are you referring to the following snippet:
>
> long startTime = new java.util.Date().getTime();
>  int frequency = RecurrenceRule.DAILY;
>  int interval = 1;
>  int count = 20;
>  LocalDispatcher dispatcher=dctx.getDispatcher();
>  dispatcher.schedule("myService",_context, startTime, frequency,
> interval, count);
>          }catch (GenericServiceException e){
>  Debug.logError("Error trying to Schedule Recurring payment Service: "
> + e.getMessage());
>         }
>
> Can you tell me where/how should I use the above snippet?
>
> Deepak
>
> On 7/22/05, David E. Jones <[hidden email]> wrote:
>
>>
>> You can't just put data into Entity Engine XML files, they must be
>> loaded through either the install process or the XML Import pages in
>> the WebTools webapp.
>>
>> -David
>>
>>
>> On Jul 22, 2005, at 10:00 AM, deepak sahu wrote:
>>
>>
>>> Hello Everyone,
>>> I am using OFBiz (version 5027) on Windows 2000.
>>> I have a requirement of running a particular piece of job after
>>> every 15 days.
>>> I came across the Job Scheduler feature of OFBiz and I think this is
>>> what I should use.
>>>
>>> After going through this list and the code in Order application I
>>> understand that to use a scheduled job I need to add
>>> MyAppScheduledServices.xml and make an entry in the
>>> ofbiz-component.xml of MyApp.
>>>
>>> Basically I copied the ProductScheduledServices.xml into MyApp\data
>>> and made required changes. I gave unique values for the
>>> recurrenceRuleId,recurrenceInfoIdand jobId. I gave the startDateTime
>>> as 2005-07-22 00:00:00.000 and runTime as 2005 07-22 15:00:00.000.
>>> I specified a service which has a System.out.println statement.  
>>> Next I
>>> restarted the server and waited for the service to be called. I got
>>> nothing.
>>> I checked the JobSandbox entity with webtools but didn't find any
>>> entry for my service.
>>>
>>> Can anybody plz tell me what I am missing?
>>> I would really appreciate some help.
>>>
>>> With Regards,
>>> Deepak
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [OFBiz] Users - How to use the Job Scheduler

deepak sahu
In reply to this post by David E. Jones
Hi David,
I was able to run the scheduled services both by importing and
"run-install" methods.
I found out that when I restart the sever,after install/import, a
parent process(for the scheduled job) is created and it executes the
service once. Then depending on the "frequency" the scheduled service
gets executed again.
I have got two questions here:
1. Can we prevent the execution of the parent process when the server
starts and specify when exactly the service should run for the first
time ever?
2. What does the following tags mean
    untilDateTime,countNumber,startDateTime,runTime ?

Could you please put some light on the above queries?
I really appreciate your help.

Regards,
Deepak



On 7/22/05, David E. Jones <[hidden email]> wrote:

>
> You can't just put data into Entity Engine XML files, they must be
> loaded through either the install process or the XML Import pages in
> the WebTools webapp.
>
> -David
>
>
> On Jul 22, 2005, at 10:00 AM, deepak sahu wrote:
>
> > Hello Everyone,
> > I am using OFBiz (version 5027) on Windows 2000.
> > I have a requirement of running a particular piece of job after
> > every 15 days.
> > I came across the Job Scheduler feature of OFBiz and I think this is
> > what I should use.
> >
> > After going through this list and the code in Order application I
> > understand that to use a scheduled job I need to add
> > MyAppScheduledServices.xml and make an entry in the
> > ofbiz-component.xml of MyApp.
> >
> > Basically I copied the ProductScheduledServices.xml into MyApp\data
> > and made required changes. I gave unique values for the
> > recurrenceRuleId,recurrenceInfoIdand jobId. I gave the startDateTime
> > as 2005-07-22 00:00:00.000 and runTime as 2005 07-22 15:00:00.000.
> > I specified a service which has a System.out.println statement. Next I
> > restarted the server and waited for the service to be called. I got
> > nothing.
> > I checked the JobSandbox entity with webtools but didn't find any
> > entry for my service.
> >
> > Can anybody plz tell me what I am missing?
> > I would really appreciate some help.
> >
> > With Regards,
> > Deepak
> >
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/users
> >
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users