One of constructors in StdSchedulerFactory accepts name value
collection. It is scheduler configuration where you can specify job
store type. The entry in dictionary is:
<item key="quartz.jobStore.type">Quartz.Impl.AdoJobStore.JobStoreTX,
Quartz</item>
You may need to specify additional properties for the store. Check
online for possible options.
I believe the scheduler you are configuring on windows service is
supposed to fire jobs. You may also need “client” scheduler
responsible for scheduling triggers for jobs. The client scheduler
could be used in web service method handler, message bus event handler
etc. If this is your case, you can look at Quartz integration example
in project NOperation@soureforge.
If you have quartz sources downloaded, you can look at example13 (src
\Quartz.Examples\example13\).
I5riza
well for now i'm trying to write a small programme that work as ADO
Schedulare,
i have ASP.net application where i can add jobs and configure them,
and i need a windows service to keep the scheduler working on the
server, for now i can do CRUD operations on tasks so obviously i have
managed to configure the Scheduler to use the adojobstore, but my case
is i can't make those jobs works..
so i've googled a little bit and i found a blog that shows how to
configure Quartz.net to work as Windows service (http://
jvilalta.blogspot.com/2009/03/getting-started-with-quartznet-
part-1.html) but the good guy who wrote those articles didn't wrote
how to configure this Quartz Service to use the adojobstore.
now i'm just trying to make a small programme to make my scheduled
jobs (stored in database) fires, because if i can make it work i can
fixed as a service later, so please have a look at ADOJobStore
properties:
class Program
{
static log4net.ILog Log = null;
static void Main(string[] args)
{
log4net.Config.XmlConfigurator.Configure();
log4net.ILog Log =
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
NameValueCollection properties = new
NameValueCollection();
properties["quartz.scheduler.instanceName"] =
"TaskScheduler";
properties["quartz.scheduler.instanceId"] =
"instance_one";
properties["quartz.threadPool.type"] =
"Quartz.Simpl.SimpleThreadPool, Quartz";
properties["quartz.threadPool.threadCount"] = "5";
properties["quartz.threadPool.threadPriority"] = "Normal";
properties["quartz.jobStore.misfireThreshold"] = "60000";
// if running MS SQL Server we need this
properties["quartz.jobStore.lockHandler.type"] =
"Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz";
properties["quartz.jobStore.driverDelegateType"] =
"Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz";
properties["quartz.jobStore.dataSource"] = "default";
properties["quartz.dataSource.default.connectionString"] =
"Data Source=AMINE-PC-SE7EN\\SQLEXPRESS;Initial Catalog=NameDB;User
ID=user;Password=pass";
properties["quartz.dataSource.default.provider"] =
"SqlServer-20";
properties["quartz.jobStore.type"] =
"Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
properties["quartz.jobStore.useProperties"] = "true";
properties["quartz.jobStore.clustered"] = "true";
properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
ISchedulerFactory schedFact = new
Quartz.Impl.StdSchedulerFactory(properties);
IScheduler sched = schedFact.GetScheduler();
sched.Start();
}
}
On 2 avr, 06:44, i5riza <rimas.zavis...@gmail.com> wrote:
> Aleo
Does it help?
i5riza
# jobstore config
quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
quartz.jobStore.dataSource = default
quartz.jobStore.tablePrefix = QRTZ_
quartz.jobStore.clustered = true
quartz.jobStore.lockHandler.type =
Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz
quartz.jobStore.driverDelegateType=Quartz.Impl.AdoJobStore.SqlServerDelegate
, Quartz
quartz.dataSource.default.connectionString = Server=db;Database=db;user
id=uid;pwd=pwd
quartz.dataSource.default.provider = SqlServer-20
# job initialization plugin handles our xml reading, without it defaults are
used -->
quartz.plugin.xml.type = Quartz.Plugin.Xml.JobInitializationPlugin, Quartz
quartz.plugin.xml.fileNames = ~/quartz_jobs.xml
thank you i5riza
--
You received this message because you are subscribed to the Google Groups
"Quartz.NET" group.
To post to this group, send email to quar...@googlegroups.com.
To unsubscribe from this group, send email to
quartznet+...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/quartznet?hl=en.
Jay Vilalta,
thank you for writing "Getting Started With Quartz.Net" it helped, but
still confused i have added the lined that you have wrote, and i
started the service "Quartz Server", but i've got is bunch after the
initializings ends of exception in a loop, it's start with the
ClusterManager Exception
.....
2010-04-02 15:02:49,025 [2340] DEBUG
Quartz.Server.Service.QuartzService - Starting service
2010-04-02 15:02:49,129 [2340] ERROR
Quartz.Impl.AdoJobStore.JobStoreTX - ClusterManager: Error managing
cluster: Failed to obtain DB connection from data source 'default':
System.InvalidOperationException: Instance failure.
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, .
.......
i wonder if i have to add something or a configuration to my
quartz_job.xml.
thank you
Seems like the server can't connect to the database...
a recap:
=> i can add jobs to the database
=> i can manage them
=> i have installed the Quartz Service as described in the "http://
> > jvilalta.blogspot.com/2009/03/getting-started-with-quartznet-
> > part-1.html%
=> this service read my jobs <caution_please>BUT</caution_please>
can't execute them,and i go in result a lot of log files of 1024 ko
each of exceptions messages. the exception said that
"IllegalArgumentException -> Job class cannot be null"
=> also i've noted that the Quartz Service have stored the sample
Payroll job in the database, this job was wrote in the quartz_job.xml.
if anything can help you to help me, just ask!
thank you so much for your help.
Amine
From the text of exception, i think Type.GetType("job class name")
returned NULL. This might be because of missing assembly.
i5riza
On 3 Bal, 03:15, aleo <amineabdalkha...@gmail.com> wrote:
thanks i5riza and Jay Vilalta!
# configure thread pool info
quartz.threadPool.type = Quartz.Simpl.SimpleThreadPool, Quartz
quartz.threadPool.threadCount = 10
quartz.threadPool.threadPriority = Normal
# jobstore config
quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
quartz.jobStore.dataSource = myDs
quartz.jobStore.tablePrefix = QRTZ_
quartz.jobStore.clustered = true
quartz.jobStore.lockHandler.type =
Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz
quartz.jobStore.driverDelegateType=
Quartz.Impl.AdoJobStore.SqlServerDelegate, Quartz
quartz.dataSource.myDs.connectionString = Data Source=AMINE-PC-SE7EN
\SQLEXPRESS;Initial Catalog=aleo;User ID=login;Password=password
quartz.dataSource.myDs.provider = SqlServer-20
# job initialization plugin handles our xml reading, without it
defaults are used -->
#quartz.plugin.xml.type = Quartz.Plugin.Xml.JobInitializationPlugin,
Quartz
#quartz.plugin.xml.fileNames = ~/quartz_jobs.xml
# export this server to remoting context
quartz.scheduler.exporter.type =
Quartz.Simpl.RemotingSchedulerExporter, Quartz
quartz.scheduler.exporter.port = 555
quartz.scheduler.exporter.bindName = QuartzScheduler
quartz.scheduler.exporter.channelType = tcp
-----------------------------------------------------------------------------
so what's wrong, i've googled this issue but the solution didn't
worked for me, the jobs are added correctly to the database, but the
service scheduler won't execute them.
Regards Amine.
rimas
Configuration I am using is defined in windsor config, not in
application config. You can download the sample from the following
link.
https://noperation.svn.sourceforge.net/svnroot/noperation/trunk/source/Projects.Northwind.Application/Configuration
There is separate configuration part for quartz client (used to
schedule jobs) and quartz service (used to fire jobs).
Does it help?
i5riza
2010/4/12, i5riza <rimas.z...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Quartz.NET" group.
> To post to this group, send email to quar...@googlegroups.com.
> To unsubscribe from this group, send email to
> quartznet+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/quartznet?hl=en.
>
>
--
Enviado desde mi dispositivo móvil
On 12 avr, 12:08, Ariel Piñeiro <ariel...@gmail.com> wrote:
> Yes. You must be to use a Windors config, regards.
>
> 2010/4/12, i5riza <rimas.zavis...@gmail.com>:
>
>
>
>
>
> > I am not certain this exception is because of wrong configuration.
>
> > Configuration I am using is defined in windsor config, not in
> > application config. You can download the sample from the following
> > link.
> >https://noperation.svn.sourceforge.net/svnroot/noperation/trunk/sourc...