Ejemplo n.º 1
0
    public static void RegisterQuartz()
    {
        var jobLists = new List <QuartzHelper.JobList>()
        {
            new QuartzHelper.JobList()
            {
                Name           = "TopHits",
                Group          = "group",
                CronExpression = "0 0 0/1 * * ? ",//每小时
                JobType        = new HourJob()
            }
        };

        var quartz = new QuartzHelper(LogHelper.Debug);

        quartz.Run(jobLists);
    }
Ejemplo n.º 2
0
        public static void RegisterQuartz()
        {
            var jobLists = new List <QuartzHelper.JobList>()
            {
                //每天6小时执行一次
                new QuartzHelper.JobList()
                {
                    Name           = "DeleteAttachment",
                    Group          = "UnUsedAttachment",
                    CronExpression = "0 0 0/6 * * ? ",
                    JobType        = new Jobs.DeleteAttachmentJob()
                }
            };

            var quartz = new QuartzHelper(LogHelper.Debug);

            quartz.Run(jobLists);
        }