首页 \ 问答 \ Quartz.net调度程序进入待机状态(Quartz.net scheduler going to standby)

Quartz.net调度程序进入待机状态(Quartz.net scheduler going to standby)

我正在使用嵌入在我的asp.net应用程序中的quartz .net服务器,但总是进入待机模式。 即使在NORMAL模式下预定的cron作业也是如此。

这些是我的调度程序属性:

var properties = new NameValueCollection();

        properties["quartz.dataSource.DataSource.connectionString"] = "data source=connectionstring";
        properties["quartz.dataSource.DataSource.provider"] = "SqlServer-20";

        properties["quartz.scheduler.instanceName"] = "MyScheduler";

        properties["quartz.threadPool.type"] = "Quartz.Simpl.SimpleThreadPool, Quartz";
        properties["quartz.threadPool.threadCount"] = "5";
        properties["quartz.threadPool.threadPriority"] = "Normal";

        properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
        properties["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz ";
        properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
        properties["quartz.jobStore.dataSource"] = "DataSource";
        properties["quartz.jobStore.useProperties"] = "true";

        return new StdSchedulerFactory(properties);

如何使它始终运行? 我是否需要将其作为Windows服务运行?


I'm using quartz .net server embedded in my asp.net application but is always turning into standby mode. Even with a scheduled cron job in NORMAL mode.

Those are my scheduler properties:

var properties = new NameValueCollection();

        properties["quartz.dataSource.DataSource.connectionString"] = "data source=connectionstring";
        properties["quartz.dataSource.DataSource.provider"] = "SqlServer-20";

        properties["quartz.scheduler.instanceName"] = "MyScheduler";

        properties["quartz.threadPool.type"] = "Quartz.Simpl.SimpleThreadPool, Quartz";
        properties["quartz.threadPool.threadCount"] = "5";
        properties["quartz.threadPool.threadPriority"] = "Normal";

        properties["quartz.jobStore.type"] = "Quartz.Impl.AdoJobStore.JobStoreTX, Quartz";
        properties["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.StdAdoDelegate, Quartz ";
        properties["quartz.jobStore.tablePrefix"] = "QRTZ_";
        properties["quartz.jobStore.dataSource"] = "DataSource";
        properties["quartz.jobStore.useProperties"] = "true";

        return new StdSchedulerFactory(properties);

How to make it always running? Do I need to run it as a windows service?


原文:https://stackoverflow.com/questions/18848117
更新时间:2022-01-03 12:01

最满意答案

使用WS_EX_OVERLAPPEDWINDOW作为CreateWindowEx函数的第一个参数(而不是WS_OVERLAPPEDWINDOW ,它不是有效的扩展窗口样式)。


Use WS_EX_OVERLAPPEDWINDOW as the first parameter of your CreateWindowEx function (instead of WS_OVERLAPPEDWINDOW, which is not a valid extended window style).

相关问答

更多
  • 使用WS_EX_OVERLAPPEDWINDOW作为CreateWindowEx函数的第一个参数(而不是WS_OVERLAPPEDWINDOW ,它不是有效的扩展窗口样式)。 Use WS_EX_OVERLAPPEDWINDOW as the first parameter of your CreateWindowEx function (instead of WS_OVERLAPPEDWINDOW, which is not a valid extended window style).
  • 对于初学者,我会看看windowsx.h中的消息破解程序 ; 他们会帮助您在窗口过程中编写乏味的案例陈述,并且在函数名称中提供了一定的规范。 For starters, I'd take a look at the message crackers in windowsx.h; they'll save you writing tedious case statements in your window procedures, and they suggest a certain discipline in ...
  • 如果需要unicode字符串,则关键字为wchar_t const wchar_t g_szClassName[] = L"myWindowClass"; 编辑: 此外,请确保对未设置的结构WNDCLASSEX的其余成员进行零初始化,即 WNDCLASSEX wc = {}; 要么 ZeroMemory(&wc, sizeof(wc)); If you want unicode string, the keyword is wchar_t const wchar_t g_szClassName[] = ...
  • 我看到至少两个错误。 首先,你注册课程 windowClass.hInstance = hI; 但是当你创建窗口时,你会传递一个不同的HINSTANCE : m_hWnd = CreateWindowEx(dwExStyle, className, title, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, GetModuleHandle(NULL), this); // ...
  • 使用IsIconic功能。 use the IsIconic function.
  • 要防止程序挂起,可以使用PostMessage而不是SendMessage : PostMessage(hWnd, WM_COMMAND, GetMenuItemID(hWndSubMenu, 1), 0); 您可能需要进一步研究差异: Send Message和Post Message之间的区别以及它们与C#,WPF和Pure windows编程之间的区别? To prevent your program from hanging, you can use PostMessage instead of ...
  • 我在一个dll中创建了所有的winapi函数,并从c#中调用它们。 有了这个,我可以使用winapi创建一个c ++窗口,其中ac#form作为父窗口。 I made all my winapi functions in a dll and called them from c#. With this I can create a window in c++ using winapi that has a c# form as parent window.
  • 使用GetOpenFileName() 。 请注意,该功能会阻止,直到用户选择文件,因此如果要在后台继续渲染等,请确保在单独的线程上运行它。 Use GetOpenFileName(). Note that that function blocks until the user selects a file, so if you want to continue rendering etc. in the background, make sure to run it on a separate threa ...
  • 我不知道你的意思是“没有句柄的轻量级控件”,但我想它们是简单的C ++类(而不是真正的“控件”)必须在父窗口的客户区域上绘制。 “问题”是WM_PAINT消息是低优先级消息,如果窗口在其客户区域中具有无效部分,则在应用程序产生之前发送。 您应该首先阅读的文档是: 绘画和绘图 我建议的实现,因为我已经使用了很多次并且工作得很好,是两种方法的组合: 如果需要更“优化”的实现,则处理WM_PAINT消息(以及BeginPaint() / EndPaint()函数)以使用PAINTSTRUCT结构的rcPaint成 ...
  • 可以使用TrackPopupMenu(Ex)API函数显示菜单栏或任何其他子菜单(popu菜单)的子菜单项。 此功能需要子菜单的菜单句柄和显示它的坐标。 例如,为了显示菜单栏的“文件”菜单,应采取以下操作:使用GetSubMenu(0)获取“文件”子菜单句柄; 使用GetMenuItemRect获取文件菜单项矩形; 使用矩形计算所需的坐标; TrackPopupMenu(Ex)显示菜单。 The submenu items of menubar or any other submenu (popu menu ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。