Quartz.NET实现不使用教程不合拍 [英] Quartz.NET implementation doesn't jive with tutorials

查看:144
本文介绍了Quartz.NET实现不使用教程不合拍的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用本教程

I attempted to implement a very simple Quartz.net implementation using this tutorial

using Quartz;
using Quartz.Impl;

// construct a scheduler factory
ISchedulerFactory schedFact = new StdSchedulerFactory();

// get a scheduler
IScheduler sched = schedFact.GetScheduler();
sched.Start();

// construct job info
JobDetail jobDetail = new JobDetail("myJob", null, typeof(HelloJob));
// fire every hour
Trigger trigger = TriggerUtils.MakeHourlyTrigger();
// start on the next even hour
trigger.StartTimeUtc = TriggerUtils.GetEvenHourDate(DateTime.UtcNow);  
trigger.Name = "myTrigger";
sched.ScheduleJob(jobDetail, trigger);



我遇到的问题是(例如) MakeHourlyTrigger 不在智能感知可用,给我的错误

The problem I am running into is (for example) MakeHourlyTrigger is not available in the Intellisense, and gives me the error

Quartz.TriggerUtils不包含定义'MakeHourlyTrigger

Quartz.TriggerUtils does not contain a definition for 'MakeHourlyTrigger'.

我得到的错误类型,如的JobDetail

I get errors on types such as JobDetail:

的类型或命名空间名称的JobDetail'找不到(是否缺少using指令或程序集引用?)

"The type or namespace name 'JobDetail' could not be found (are you missing a using directive or an assembly reference?)"

也许我累了,失去了一些东西愚蠢和容易...我希望是这样。所有我见过的因特网和例子说,我应该使用Quartz和使用Quartz.Impl。请告诉我,我只是失去了一些东西很容易...

Maybe I'm tired and missing something stupid and easy... I hope that's the case. All of the examples I have seen on the Internets say that I should be using Quartz and using Quartz.Impl. Please tell me that I'm just missing something easy...

推荐答案

该文档是针对1.0 API。 Shiz已经改变:(是的,他们的艺术震破。

The documentation is aimed at the 1.0 API. Shiz has now changed :( And yes, they art breaketh.

所以..帮助..的检查这个官方页面迁移出来。ü可能会发现有一些爱。

So .. to help .. check this official migration page out. U might find some love in there.

这篇关于Quartz.NET实现不使用教程不合拍的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆