Filling Job detail values in the JDBC datastore - quartz-scheduler

I'm learning Quartz and I've gone through the tutorials. I used the RAM JOB store. Now I want to move it to jdbc job store. I've created database and configured it. But the scheduler has not started. What is the values that I've to populate it with the database.

You don't need to populate the database. It is highly recommended to NOT write directly to quartz tables: http://quartz-scheduler.org/documentation/best-practices.
Just configure the scheduler programmatically by adding triggers and job details as described in example: http://quartz-scheduler.org/documentation/quartz-2.2.x/examples/Example1.

Related

How to keep job schedule data in database for Quartz Scheduler

Currently, we have our job scheduling data stored in the database table. This allows the business user to alter the schedule in the database table through a customised screen. We are planning to migrate our scheduling framework to quartz. I have gone through the quartz documentation, it does not have anything to cover this requirement. Basically, if the schedule is changed, subsequent runs after the schedule job would be continued as per the new schedule, and this can happen without the restart.
You can reschedule the existing quartz trigger using this method
http://www.quartz-scheduler.org/api/2.3.0/org/quartz/Scheduler.html#rescheduleJob-org.quartz.TriggerKey-org.quartz.Trigger-

Connect services DataConnect and DB2 Warehouse on Cloud (former DashDB)

I am working on the migration of a db2 process, which connects to several remotes servers, exports data into our local db, and then manipulates it (insert computed data, calculated times, etc) I have created some activities in DataConnect to replicate the export data from different datasources and load to local tables. The scripts that handles the data have to be done in DB2 Warechouse on Cloud (ex dashdb)
Currently, this scripts run automatically triggered by the first task (manual) However, having the new processes separated (2 services) it does not allow me to automate it. Furthermore, we have many activities in dataconnect, then it keeps switching between dc and db2...and you have to go from one console to the other.
Does anyone know of a Bluemix service which allow schedule or trigger jobs or events from services? Is there a way to use the API and programmatically do this?
Thanks
Well,
Bluemix offers Workload Scheduler. Data Connect allows to schedule activities.
Juan,
A couple of things come to mind for automation here. Do the databases that you are speaking of have IP line of sight to the Warehouse DB ? If so remote tables may be able to help depending on the source database. Once the data is visible you should be able to write a SQL process that manages the process all from Warehouse DB.
The other possibility is external tables as long as the data is visible on the head node. There are some other choices like s3 storage. I think the concept is if that you can push your data into S3 storage you can pull it into Warehouse DB. I think you should be able to coordinate this all from the Warehouse db side as long as the data is visible through remote tables and/or external tables.

Quartz Scheduler implementation

What is the internal mechanism for persisting data using Quartz Scheduler?
I went through internet but didn't find clear description.
It would be great if you suggest the same to work in hibernate platform.
When you use Quartz Scheduler in your project you should have a file for its properties which is called quartz.properties. In this file you should determine your persistence mechanism by using parameter: org.quartz.jobStore.class
The value for this parameter can be the followings:
org.quartz.impl.jdbcjobstore.JobStoreCMT: it means that you want to persist in a database and transactions are managed by a container (Like Weblogic, JBoss, ...)
org.quartz.impl.jdbcjobstore.JobStoreTX: it means that you want to persist in a database and transactions are NOT managed by a container. this option is used mostly when you run Quartz Scheduler as a standing alone application.
org.quartz.simpl.RAMJobStore: This option actually is not recommended in production environment because according this parameter Quartz persists jobs and triggers just in RAM!
org.terracotta.quartz.TerracottaJobStore: The last option is using Terracotta Server as your persistence unit, Quartz says that it is the fastest way.
I myself prefer first option, it is straightforward and more reliable I think.
You can read more about this configuration here.
And about hibernate, quartz will manage the persistence tasks, like rollback and persist, and you wont being involved in this process.

Quartz scheduler - external Trigger configuration through AdoJobStore and Clustering

Exploring (Ado)JobStore (data base job store in general) I met subjects like clustering, load balancing and sharing jobs' work data state across multiple applications.
But I think I didn't find a JobStore subject that covers my scenario.
I need to run Quartz Jobs in Windows Service and I need to be able to change configuration of Triggers in other application (in Admin panel in web application) and the Triggers to be applied by the Quartz in my Windows Service automatically (Quartz tracks changes and applies them).
Is it possible to do this by using AdoJobStore/Clustering mechanism? I mean in terms of JobStore's features, so by using Quartz scheduler API. Not by using SQL and changing data in Quartz tables directly or any other workarounds (according to Quartz's Best Practices doc).
The Quartz.NET scheduler can be accessed remotely, independently of job stores. Since you already have a web app you can add a reference to the remote scheduler and use the API to administer jobs, triggers etc.

Configuring Quartz.net Tasks

I want to be able to set up one or more Jobs/Triggers when my app runs. The list of Jobs and triggers will come from a db table. I DO NOT care about persisting the jobs to the db for restarting or tracking purposes. Basically I just want to use the DB table as an INIt device. Obviously I can do this by writing the code myself but I am wondering if there is some way to use the SQLJobStore to get this functionality without the overhead of keeping the db updated throughout the life of the app using the scheduler.
Thanks for you help!
Eric
The job store's main purpose is to store the scheduler's state, so there is no way built in to do what you want. You can always write directly to the tables if you want and this will give you the results you want, but this isn't really the best way to do it.
The recommended way to do this would be to write some code that reads the data from your table and then connects to the scheduler using remoting to schedule the jobs.