Example #1
0
        static void Main(string[] args)
        {
            try
            {
                Task.Run(async() =>
                {
                    StdSchedulerFactory factory = new StdSchedulerFactory(QuartzConfiguration.LocalConfig(false));

                    // get a scheduler
                    IScheduler sched = await factory.GetScheduler();

                    if (!sched.IsStarted)
                    {
                        await sched.Start();
                    }

                    Console.WriteLine("Local Server has been started..");

                    while (true)
                    {
                        Thread.Sleep(60 * 60000);
                    }
                }).Wait();
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
        }
Example #2
0
        public async Task <ActionResult> Local()
        {
            await CreateJob(QuartzConfiguration.LocalConfig(false), "local", true);

            return(View("Index"));
        }