How to setup Quartz.NET for scheduling Emails

后端 未结 2 921
有刺的猬
有刺的猬 2021-01-23 07:09

There are two solutions Quartz.server.2008.sln and quartz.2008.sln in the downloaded quartz.NET library. Now I have to setup recurring job. The

2条回答
  •  萌比男神i
    2021-01-23 07:21

    The quartz documentation does seem to assume that everyone knows the basics and is only looking for details.

    Hopefully the steps below, along with the Quartz documentation and samples, you'll be able to get your project started.

    Step 1: Open Windows Explorer to the ...\Quartz.NET-1.0.3\database\tables folder
    Step 2: Execute the script appropriate for your database
    Step 3: Open Windows Explorer to the ...\Quartz.NET-1.0.3\server\bin\3.5\console folder
    Step 4: Create a class library assembly and add a class that implements the IJob interface.
    Step 5: Edit the quartz.config file. Mine is below.

      ################################################################################
      # Added by Brad Bruce
      # please refer to http://quartznet.sourceforge.net/tutorial/lesson_9.html before making changes
      ################################################################################
      quartz.jobStore.type = Quartz.Impl.AdoJobStore.JobStoreTX, Quartz
      quartz.jobStore.driverDelegateType = Quartz.Impl.AdoJobStore.OracleDelegate, Quartz
      quartz.jobStore.tablePrefix = QRTZ_
      quartz.jobStore.dataSource = myDS
      quartz.dataSource.myDS.connectionString = Data Source=xe; User Id=quartz; Password=quartz;
      quartz.dataSource.myDS.provider = OracleODP-20
      quartz.jobStore.useProperties = true
    

    Step 6: Run the console server and verify that the dummy job is running
    Step 7: Copy the console project to a new project
    Step 8: Modify the console source to schedule the job via the Quartz API. You will be able to reuse this project to schedule other jobs.

    If they would only add a project to schedule and manage the jobs, I think Quartz.Net would really take off.

提交回复
热议问题