zoukankan      html  css  js  c++  java
  • windows服务

    protected override void OnStart(string[] args)
            {
                // TODO: 在此处添加代码以启动服务。
                this.timerToPDF.Enabled = true;
            }

            protected override void OnStop()
            {
                // TODO: 在此处添加代码以执行停止服务所需的关闭操作。
                this.timerToPDF.Enabled = false;
            }

            protected override void OnContinue()
            {
                // TODO: 服务继续
                this.timerToPDF.Enabled = true;
            }

            protected override void OnPause()
            {
                // TOD: 服务暂停
                this.timerToPDF.Enabled = false;
            }

            private void timerToPDF_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
            {
                if (DateTime.Now.Hour > 8)
                {
                    this.timerToPDF.Enabled = false;
                    //编写自己的代码
                    this.timerToPDF.Enabled = true;
                }
            }
  • 相关阅读:
    激活
    年龄校验,精确到日
    腾讯消息队列CMQ一键化部署脚本
    腾讯消息队列CMQ部署与验证
    蓝鲸6.0.1部署
    docker离线安装
    蓝鲸平台开启consul.conf UI界面
    基于docker一键化部署LNMP环境
    阿里云镜像上传打包
    腾讯蓝鲸平台部署[5.1.29版本]
  • 原文地址:https://www.cnblogs.com/dodui/p/2323470.html
Copyright © 2011-2022 走看看