资源简介
采用Quartz.NET开源作业调度框架,实现简单的定时任务。
配合Topshelf.NET,直接安装Windows服务。
代码片段和文件信息
using System.Collections.Specialized;
using System.Configuration;
namespace QuartzTH
{
///
/// Configuration for the Quartz server.
///
public class Configuration
{
private const string PrefixServerConfiguration = “quartz.server“;
private const string KeyServiceName = PrefixServerConfiguration + “.serviceName“;
private const string KeyServiceDisplayName = PrefixServerConfiguration + “.serviceDisplayName“;
private const string KeyServiceDescription = PrefixServerConfiguration + “.serviceDescription“;
private const string KeyServerImplementationType = PrefixServerConfiguration + “.type“;
private const string DefaultServiceName = “THServer“;
private const string DefaultServiceDisplayName = “TH Server“;
private const string DefaultServiceDescription = “TH‘s Quartz Job Scheduling Server“;
private static readonly string DefaultServerImplementationType = typeof(THServer).AssemblyQualifiedName;
private static readonly NameValueCollection configuration;
///
/// Initializes the class.
///
static Configuration()
{
configuration = (NameValueCollection) ConfigurationManager.GetSection(“quartz“);
}
///
/// Gets the name of the service.
///
/// The name of the service.
public static string ServiceName
{
get { return GetConfigurationOrDefault(KeyServiceName DefaultServiceName); }
}
///
/// Gets the display name of the service.
///
/// The display name of the service.
public static string ServiceDisplayName
{
get { return GetConfigurationOrDefault(KeyServiceDisplayName DefaultServiceDisplayName); }
}
///
/// Gets the service description.
///
/// The service description.
public static string ServiceDescription
{
get { return GetConfigurationOrDefault(KeyServiceDescription DefaultServiceDescription); }
}
///
/// Gets the type name of the server implementation.
///
/// The type of the server implementation.
public static string ServerImplementationType
{
get { return GetConfigurationOrDefault(KeyServerImplementationType DefaultServerImplementationType); }
}
///
/// Returns configuration value with given key. If configuration
/// for the does not exists return the default value.
///
/// Key to read configuration with.
/// Default value to return if configuration is not found
/// The configuration value.
private static string GetConfigurationOrDefault(string configurationKey string defaultValue
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 101888 2015-11-12 10:52 QuartJobApp\QuartJobApp\.vs\QuartJobApp\v14\.suo
文件 135574 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\Common.Logging.3.3.0.nupkg
文件 44544 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net35\Common.Logging.dll
文件 153088 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net35\Common.Logging.pdb
文件 167814 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net35\Common.Logging.xm
文件 44544 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net40\Common.Logging.dll
文件 169472 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net40\Common.Logging.pdb
文件 167494 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.3.3.0\lib\net40\Common.Logging.xm
文件 32121 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\Common.Logging.Core.3.3.0.nupkg
文件 9728 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net35\Common.Logging.Core.dll
文件 11776 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net35\Common.Logging.Core.pdb
文件 54432 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net35\Common.Logging.Core.xm
文件 10240 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net40\Common.Logging.Core.dll
文件 11776 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net40\Common.Logging.Core.pdb
文件 54432 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\net40\Common.Logging.Core.xm
文件 10240 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\portable-win+net40+sl40+wp7\Common.Logging.Core.dll
文件 11776 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\portable-win+net40+sl40+wp7\Common.Logging.Core.pdb
文件 54432 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Core.3.3.0\lib\portable-win+net40+sl40+wp7\Common.Logging.Core.xm
文件 37586 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\Common.Logging.Log4Net1211.3.3.0.nupkg
文件 15360 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net35\Common.Logging.Log4Net1211.dll
文件 38400 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net35\Common.Logging.Log4Net1211.pdb
文件 17250 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net35\Common.Logging.Log4Net1211.xm
文件 15360 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net40\Common.Logging.Log4Net1211.dll
文件 42496 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net40\Common.Logging.Log4Net1211.pdb
文件 17250 2015-10-15 16:14 QuartJobApp\QuartJobApp\packages\Common.Logging.Log4Net1211.3.3.0\lib\net40\Common.Logging.Log4Net1211.xm
文件 299008 2015-10-15 16:13 QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net10-full\log4net.dll
文件 1432719 2015-10-15 16:13 QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net10-full\log4net.xm
文件 299008 2015-10-15 16:13 QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net11-full\log4net.dll
文件 1433870 2015-10-15 16:13 QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net11-full\log4net.xm
文件 303104 2015-10-15 16:13 QuartJobApp\QuartJobApp\packages\log4net.2.0.3\lib\net20-full\log4net.dll
............此处省略108个文件信息
- 上一篇:kiwi Syslog 8.3.7 破解版
- 下一篇:数据库原理 PPT详细、完整
相关资源
- Spring-task定时任务
- springboot 定时任务加layui的界面版
- SpringBoot+mybatis登录注册及其账号密码
- RW 微内核系统,创建一个定时任务案
- spring+quartz动态定时任务创建 +mybatis
- spring-qutarz_demo
- 使用多线程开启定时任务(注解版)
- web页面可配置话的动态生成spring定时
- mybatis定时任务列表查询分页切割
- 基于quartz定时任务框架.rar
- Spring 框架自带定时任务和Quartz定时任
- Spring @Scheduled定时任务动态修改cron参
- 稳定window系统服务器秒级别自动定时
- Springboot中使用数据库配置定时任务
- spring整合quartz两种方式以及spring自带
- springboot 集成quartz
- zw_quartz定时任务.zip
- springboot动态配置定时任务(schedule)
- SpringBoot集成Quartz分布式定时任务
- SpringCloudSchedule定时任务
- spring-boot 2.0.2 数据库配置定时任务
评论
共有 条评论