且听疯吟 在此记录扯淡的青春
Qzzz

Windows 的计划任务功能不够用,于是试着写了个支持插件和动态加载的定时执行任务工具 Qzzz,暂时是个坑...

Qzzz

A scheduler app for windows.

How to use

  • Run as a windows service

    Use Install.bat to install the QzzzService

  • Run as a console

    Run Qzzz.exe and do not close the console.

Create a plugin

  • create a config file qzzz.json

    {
        "Id": "323ADBF530C4307B336C670B3F5BD229",
        "Name": "ToastPluginDemo",
        "Version": "1.0",
        "Description": "Toast plugin demo",
        "CronExpression": "*/15 * * * * ?",
        "StartAt": "2014-06-01 00:00:00",
        "EndAt": "2014-07-01 00:01:00",
        "PluginFileName": "Qzzz.ToastPluginDemo.dll",
        "Author": "caoyue",
        "Url": "https://github.com/caoyue/Qzzz"
    }
    
    • Id should be a guid string
    • CronExpression is a Quartz Cron Expression, a little different from *nix
    • StartAt and EndAt is optional
  • Create a CSharp library project
  • Add Qzzz.Plugin.dll to the references

  • Implement IPlugin interface

    public class SimplePlugin : IPlugin
    {
        public void Execute(PluginContext pluginContext)
        {
            // do your job here...
        }
    
        public bool Pause(PluginContext pluginContext)
        {
            // pause job while the return is true...
        }
    }
    
    • You can find a demo in Plugins\Qzzz.SimplePluginDemo
    • Add Qzzz.Toast.dll to use toast notification on windows 8/8.1, like Plugins\Qzzz.ToastPluginDemo
  • Build your project and copy the plugin folder to Qzzz\Plugins