Qzzz
Windows 的计划任务功能不够用,于是试着写了个支持插件和动态加载的定时执行任务工具 Qzzz,暂时是个坑…
Qzzz
A scheduler app for windows.
How to use
- Run as a windows service
UseInstall.batto install theQzzzService - Run as a console
RunQzzz.exeand 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" }Idshould be a guid stringCronExpressionis a Quartz Cron Expression, a little different from *nixStartAtandEndAtis optional
Create a CSharp library project
Add
Qzzz.Plugin.dllto the referencesImplement
IPlugininterfacepublic 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.dllto use toast notification on windows 8/8.1, likePlugins\Qzzz.ToastPluginDemo
- You can find a demo in
Build your project and copy the plugin folder to
Qzzz\Plugins