zoukankan      html  css  js  c++  java
  • Quartz.Net的一个Bug

    在应用Quartz.Net 1.0或从SVN获取代码自行编译程序集,当使用数据库作为Job Store时,假如系统时区设置不当,Quartz.Net将无法正常执行。错误出在StdAdoDelegate.cs中的967行(标红处),此处应该修改为TimeZoneInfo.Id(C# 3.5)。

    /// <summary>
            
    /// Insert the cron trigger data.
            
    /// </summary>
            
    /// <param name="conn">the DB Connection</param>
            
    /// <param name="trigger">the trigger to insert</param>
            
    /// <returns>the number of rows inserted</returns>
            public virtual int InsertCronTrigger(ConnectionAndTransactionHolder conn, CronTrigger trigger)
            {
                
    using (IDbCommand cmd = PrepareCommand(conn, ReplaceTablePrefix(SqlInsertCronTrigger)))
                {
                    AddCommandParameter(cmd, 
    1"triggerName", trigger.Name);
                    AddCommandParameter(cmd, 
    2"triggerGroup", trigger.Group);
                    AddCommandParameter(cmd, 
    3"triggerCronExpression", trigger.CronExpressionString);
                    AddCommandParameter(cmd, 
    4"triggerTimeZone"trigger.TimeZone.StandardName);

                    
    return cmd.ExecuteNonQuery();
                }
            }

  • 相关阅读:
    Populating Next Right Pointers in Each Node II
    Populating Next Right Pointers in Each Node
    Construct Binary Tree from Preorder and Inorder Traversal
    Construct Binary Tree from Inorder and Postorder Traversal
    Path Sum
    Symmetric Tree
    Solve Tree Problems Recursively
    632. Smallest Range(priority_queue)
    609. Find Duplicate File in System
    poj3159最短路spfa+邻接表
  • 原文地址:https://www.cnblogs.com/TerryLiang/p/1429461.html
Copyright © 2011-2022 走看看