Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Setting up jobs in ADO datastore
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
mcintyre321  
View profile  
 More options Sep 28 2007, 12:25 pm
From: mcintyre321 <mcintyre...@gmail.com>
Date: Fri, 28 Sep 2007 09:25:49 -0700
Local: Fri, Sep 28 2007 12:25 pm
Subject: Setting up jobs in ADO datastore
Hi there. We are planning to use Quartz as a backend general job
scheduler.

There will be lots of jobs that run immediately (created by our
webservers in response to user actions), and a few jobs that happen on
regular schedules (for batch processing).

I've created a very basic service implementation (which I suspect
might be a useful thing to have included in the distribution?) based
on reading the docs. I have managed to test it with run immediately
jobs, but I'm a bit confused about how I should set up the scheduled
jobs. Should I run a program once that adds the jobs to the database,
and just leave them in there? Should I use some kind of config file?
Should I have a method that adds them when the scheduler service
starts? How would this work in a farm?

thanks

harry

My scheduler class - note that
Common.Properties.QuartzSchedulerProperties is a reference to our
Common.dll where we keep constants.
___________________________________
        public partial class Service : ServiceBase
        {
                ISchedulerFactory schedulerFactory;
                IScheduler scheduler;
                public Service()
                {
                        InitializeComponent();
                        schedulerFactory = new
StdSchedulerFactory(Common.Properties.QuartzSchedulerProperties);
                        scheduler = schedulerFactory.GetScheduler();
                }

                protected override void OnStart(string[] args)
                {
                        scheduler.Start();
                }

                protected override void OnStop()
                {
                        scheduler.Shutdown();
                }
        }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marko Lahma  
View profile  
 More options Sep 29 2007, 11:18 am
From: "Marko Lahma" <marko.la...@gmail.com>
Date: Sat, 29 Sep 2007 18:18:32 +0300
Local: Sat, Sep 29 2007 11:18 am
Subject: Re: [quartznet:178] Setting up jobs in ADO datastore
Hi Harry,

> I've created a very basic service implementation (which I suspect
> might be a useful thing to have included in the distribution?) based

There's a JIRA issue about this:
http://jira.opensymphony.com/browse/QRTZNET-40 . I think a proper way
to handle is to add examples of source code how to handle this. Thanks
for you example.

> Should I run a program once that adds the jobs to the database,
> and just leave them in there? Should I use some kind of config file?
> Should I have a method that adds them when the scheduler service
> starts? How would this work in a farm?

The big difference when using DB based job store is just what creates
the confusion, initializing the job store state. There are two ways to
handle this: programmatic way and via configuration. The configuration
way is unfortunately still a job in progress (XML based configuration
of job similar to Java Quartz). The XML way would probably the way I
would go when it's finished.

But for the time being, the general instruction I would give is that
for "static" scheduling that should always exist, you should just use
the API to check whether triggers, calendars, jobs etc already exist
or not or just add them with replaceExisting = true when applicable.
Of course replacing is always redundant if you can determine whether
it's already scheduled (but again you need to replace when timing has
changed). If you look at the source of Java Quartz's
JobSchedulingDataProcessor you might get some hints.

In a farm situation there could be a race condition when setting up
the store but of course DB handles the locking etc. The scheduler
polls for next triggers and jobs so data will by synchronized to other
nodes of cluster.

Cheers,

-Marko


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »