1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using Quartz;
- using Quartz.Impl;
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.Data;
- using System.IO;
- using System.Linq;
- using System.Security.Permissions;
- using System.Text;
- using Topshelf;
- namespace TimedUpload
- {
- class Program
- {
- static void Main(string[] args)
- {
- log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config"));
- try
- {
- HostFactory.Run(x =>
- {
- x.UseLog4Net();
- x.Service<ServiceRunner>();
- x.SetDescription("SetDescription");
- x.SetDisplayName("SetDisplayName");
- x.SetServiceName("SetServiceName");
- x.EnablePauseAndContinue();
- });
- }
- catch (Exception ex)
- {
- Console.Write(ex.Message);
- }
- }
- }
- }
|