8 Replies Latest reply: Jan 22, 2013 2:57 AM by gimbal2 RSS

    Suggestion on Scheduling

    985432
      Hi experts,

      We have a application that is running in JBOSS 7 EJB 3.1 and JSF.. I will create a module that will generate a report per schedule that was define in database..

      Example: A customer define in the database that they want to generate the report every Monday 3pm.

      Any suggestion? Im thinking quartz or time services..

      Regards,
        • 1. Re: Suggestion on Scheduling
          TPD-Opitz
          user2000609 wrote:I will create a module that will generate a report per schedule that was define in database..

          Example: A customer define in the database that they want to generate the report every Monday 3pm.
          How do you force the user to be logged in at that time?

          I think the better way was to use the databases scheduling mechanism...

          bye
          TPD

          Edited by: TPD Opitz-Consulting com on 21.01.2013 15:43
          • 2. Re: Suggestion on Scheduling
            985432
            There will be a background process that will check the database whether a report need to generate for a certain customer..
            • 3. Re: Suggestion on Scheduling
              gimbal2
              Any suggestion? Im thinking quartz or time services..
              Both can be used for scheduling, yes. In my opinion what you want is a job that periodically fires, say every minute, to see if there are reports to generate by investigating the database; I don't think you want to create a scheduled job per report. If you agree with me I'm pretty sure you can use either technology for this simple task.

              The interesting bit to me is: what do you do when there actually is a report to generate, since this process tends to be a bit time consuming depending on the complexity of the report. Even more interesting: what if there are 50 reports to generate? Can they all go at once, or should that perhaps be queued?
              • 4. Re: Suggestion on Scheduling
                rp0428
                >
                I will create a module that will generate a report per schedule that was define in database..
                >
                What does 'generate a report' mean? Without knowing what needs to be done to generate a report and where the report needs to be stored when it is generated there isn't anyway to answer your question.

                Use DBMS_SCHEDULER to schedule processes. Create a stored procedure that generates the report based on your schedule 'that was define in the database'.
                • 5. Re: Suggestion on Scheduling
                  aksarben
                  I agree with the other replies: Your user interface or Web server has little or nothing to do with generating a scheduled report. That's purely a back end process. Unless you mis-spoke, and the USER is going to initiate the report.
                  • 6. Re: Suggestion on Scheduling
                    985432
                    It will generate a csv file that was extracted to the database.. Any suggestionS? THANKS
                    • 7. Re: Suggestion on Scheduling
                      rp0428
                      Then just use DBMS_SCHEDULER to schedule the execution of a procedure that creates the CSV file.
                      • 8. Re: Suggestion on Scheduling
                        gimbal2
                        rp0428 wrote:
                        Then just use DBMS_SCHEDULER to schedule the execution of a procedure that creates the CSV file.
                        That would be a valid suggestion... IF the OP is actually using an Oracle DBMS. I don't see any proof of that though.