quartz.net

Castle.Windsor lifestyle depending on context?

筅森魡賤 提交于 2019-11-29 02:27:12
问题 I have a web application where many components are registered using .LifestylePerWebRequest() , now I've decided to implement Quartz.NET , a .NET job scheduling library, which executes in separate threads, and not the Request thread. As such, HttpContext.Current yields null . My services, repositories, and IDbConnection were instanced so far using .LifestylePerWebRequest() because it made it easier to dispose of them when the requests ended. Now I want to use these components in both

In Quartz.NET is there a way to set a property that will only allow one instance of a Job to run?

。_饼干妹妹 提交于 2019-11-28 20:54:16
问题 I have a service that will run every X minutes. If that job takes longer than X minutes for some unforeseen reason I want to make sure that the trigger doesn't kick off a second instance of this job. Sample Scenario I have Job X, picks up files and is triggered by Quartz every 1 minute. Job X can typically process 100 files in 1 minute, anything over 100 files will take longer than 1 minute. Since the last run time, 150 files happen to be out there so Job X kicks off and begins processing.

Where is the documentation for Quartz.NET configuration files?

元气小坏坏 提交于 2019-11-28 16:58:08
问题 I can't find documentation anywhere on the syntax for Quartz.NET configuration files. I'd like to learn about Configuring the service itself Configuring jobs via the XML scheduler plugin. I've seen plenty of examples, but I'm looking for a definitive syntax document that shows me all of my options. 回答1: I was having a heck of a time finding info on the config format as well. Turns out the Quartz.Net source contains a nice sample App.config file in src/Quartz.Examples . It looks like the

Quartz.net - Repeat on day n, of every m months?

旧街凉风 提交于 2019-11-28 14:31:24
Using Quartz.NET, I'm trying to create a trigger that: starts September 30th , repeats on the last day of every 5 months . be able to use ITrigger.GetFireTimeAfter() to compute/project the next fire times (UI feedback) Expected: 2017-9-30 2018-2-28 2018-7-31 2018-12-31 I thought I could use a CronTrigger (ie 0 0 0 L 9/5 ? * ) But the projected days are: 2017-9-30 2018-9-30 2019-9-30 Could not use CalendarIntervalTrigger either: For example, if you choose a start time that occurs on January 31st, and have a trigger with unit Month and interval 1, then the next fire time will be February 28th,

Quartz Scheduler: How to pass custom objects as JobParameter?

拜拜、爱过 提交于 2019-11-28 11:58:51
I am planning to write a ASP.NET page to trigger the job on demand. Currently, I am using SimpleTrigger class to trigger the job but none of the __Trigger class supports object type as value in JobParameters and it has come to my knowledge that WCF Tcp binding is used under the hook to pass the parameters to job scheduling engine. I would like to know how to pass custom object (serializable) as job parameters. Thanks for your advice! There are two ways to pass an object that can be retrieved when a Quartz job executes: Pass the instance in the data map. When you set the job up, add your

WinForms - How do I access/call methods in UI thread from a separate thread without passing a delegate?

别来无恙 提交于 2019-11-28 10:52:12
问题 QUESTION : In .NET 3.5 WinForms apps, how do I access/call methods in UI thread from a separate thread, without passing a delegate? EXAMPLE : Say I have some code I want to run both (a) manually when the user clicks a button, and (b) periodically called by a process which is running in a separate non-mainUI thread but without passing a delegate. [Simplistically I'm thinking that the class that has this method is already been constructed, and the main UI thread has a handle to it, therefore if

Quartz.Net scheduler works locally but not on remote host

穿精又带淫゛_ 提交于 2019-11-28 06:29:56
问题 I have a timed quartz.net job working fine on my dev machine, but once deployed to a remote server it is not triggering. I believe the job is scheduled ok, because if I postback, it tells me the job already exists (I normally check for postback however). The email code definitely works, as the 'button1_click' event sends emails successfully. I understand I have full or medium trust on the remove server. My host says they don't apply restrictions that they know of which would affect it. Any

Cannot keep alive Web Application on IIS after Recycling or Restarting

烂漫一生 提交于 2019-11-28 01:41:00
I have an MVC application that send an e-mail periodically using Quartz.NET . Although the published application works properly on IIS , it cannot works after recycling application pool or restarting the application on IIS . Searching on the web I found several post suggesting to make some changes on config files or IIS , but none of them working properly. So, is there any method to solve the problem? I need a solution that can be applied on application side (or on IIS side if it is simple just making a config changes, etc.). I think this is a common problem when keeping an application on IIS

Jobs not chaining using JobChainingJobListener

不羁的心 提交于 2019-11-28 01:28:15
问题 I have the current code for my Quartz scheduler: var scheduler = StdSchedulerFactory.GetDefaultScheduler(); // Job1 var Job1 = JobBuilder.Create<Test1>().WithIdentity("job1", "group1").Build(); // Job2 var Job2 = JobBuilder.Create<Test2>().WithIdentity("job2", "group2").Build(); // Triggers ITrigger trigger1 = TriggerBuilder.Create().WithIdentity("trigger1", "group1").StartNow().Build() ITrigger trigger2 = TriggerBuilder.Create().WithIdentity("trigger2", "group2").StartNow()

Quartz.NET, Recur Every x Weeks

[亡魂溺海] 提交于 2019-11-27 23:11:19
i need to implement the following scenario using Quartz.NET: Recur every n week(s) on: Sunday and/or Monday, Tuesday, Wednesday, Thursday, Friday, Saturday... So for example i might select: monday and thursday, and recur every 2 weeks, is this possible? I figure it out that the way to go might be using Cron Expressions, but i haven't had luck so far with the "Recur Every X Weeks" Thanks! Is running Quartz.Net 2.0 and option for you? It has not been officially released yet, but in it there is a new trigger type that solves your problem. It's called the calendar interval trigger. Basically you