Beispiel #1
0
        public void Load()
        {
            application.WriteMessage(string.Format("开始加载插件[{0}{1}]!", Name, description), EventLogEntryType.Information);

            //加载所有任务
            ITaskPlugin _t1 = new TaskPlugin_DataBaseSelfCheck();

            application.AddTask(_t1.Name, _t1);

            //加载所有命令处理器
            //application.AddCommandExecuter(pluginName, this);
            application.WriteMessage(string.Format("插件[{0}{1}]加载成功!", Name, description), EventLogEntryType.Information);
        }
Beispiel #2
0
        /// <summary>
        /// 初始化任务服务
        /// </summary>
        private static void InitTask()
        {
            //添加测试任务插件
            Task_Test_Plugin _testPlugin = new Task_Test_Plugin();

            application.AddTask(_testPlugin.Name, _testPlugin as ITaskPlugin);

            //作者:林添喜 2006-02-03  说明:初始化任务
            //将所有未处理完的任务设置为错误
            SQL_TaskCommon.InitAllTaskState();

            //初始化时钟
            if (ConfigFile.RunTask)
            {
                ServerCommon.TaskTimer.Interval = 1000 * 60;
                ServerCommon.TaskTimer.Elapsed += new System.Timers.ElapsedEventHandler(TaskTimer_Elapsed);
                ServerCommon.TaskTimer.Enabled  = true;
                application.WriteMessage("任务运行机制启动完毕!");
            }
            else
            {
                application.WriteMessage("未设置RUNTASK参数为YES! 不启动任务运行机制!");
            }
        }
Beispiel #3
0
 private void AddNewTask(ITaskPlugin _plugin)
 {
     application.AddTask(_plugin.Name, _plugin as ITaskPlugin);
 }