Jump to content
We've recently updated our Privacy Statement, available here ×

Batch add jobs to scheduler (Quartz)


contentengineer

Recommended Posts

We're looking for methods to add 100+ jobs to scheduler based on a csv file. For example we want to send a bespoke report to 100+ customers by email based on existing data; and are trying to avoid having to go through the traditional web interface to execute.

 

It does not appear easy (nor practical) to add the raw data to the Quartz tables in a coordinated fashion using a MySQL import; due to the binary JOB_DATA (Map); plus TRIGGER_NAME and JOB_NAME.

 

Tables: qrtz_cron_triggers, qrtz_job_details, qrtz_simple_triggers, qrtz_triggers

 

Are there any other APIs to achieve this? It is not possible to drive a report generation from an existing table; as the email address has to come from Quartz.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

You could use the export/import tool to import report jobs.

 

You can create one job via the UI, export it and use the resulting XML as a template for the XMLs you would generate for the jobs to be imported.

 

The next version will also include a report scheduling web service that would serve such purposes.

 

Regards,

Lucian

Link to comment
Share on other sites

Lucian

 

Excellent lateral thinking! I'm thinking as a short term fix to write a script in PHP/Java, to call the webservice, create a report PDF, and email using SMTP.

 

Since we might be adding 1000 jobs in the future, I need some way of creating a "batch/sequential" type function... rather than overloading Quartz. It may be that I need a generic job in Quartz, that calls a "master job" which runs all the individual report units.

 

Thoughts?

 

Rob

Link to comment
Share on other sites

  • 2 weeks later...
  • 8 months later...

Heyas,

 

i am interessted in your solution. We are constantly generating new (daily) statistics and have to re-run them for the last few days/weeks/months to document the changes of the numbers over time.

A feature to "run this report for every day from X to Y and save each PDF in the repo" would be great.

 

Can you tell me a little more about your solution, contentengineer?

 

Thanks

/Marc

Link to comment
Share on other sites

Heyas,

 

i am interessted in your solution. We are constantly generating new (daily) statistics and have to re-run them for the last few days/weeks/months to document the changes of the numbers over time.

A feature to "run this report for every day from X to Y and save each PDF in the repo" would be great.

 

Can you tell me a little more about your solution, contentengineer?

 

Thanks

/Marc

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...