Git Product home page Git Product logo

Comments (2)

tynor88 avatar tynor88 commented on August 31, 2024

I will probably have time to look at this in the weekend. I will get back to you.

from topshelf.simpleinjector.

stevenfirstrowinc avatar stevenfirstrowinc commented on August 31, 2024

great. Thank you. I was able to get the xml configured to load but the jobs do not get executed. For instance if the quartz.plugin.xml.fileNames or quartz.plugin.xml.type are incorrect I get an error so I know they are loading but the jobs themselves do not run unless I manually configure and load them like so

                config.ScheduleQuartzJobAsService(configurator =>
                    configurator.WithJob(
                        () =>
                            JobBuilder.Create<SimpleJob>()
                                .WithIdentity("SimpleJob")
                                .Build())
                        .AddTrigger(
                            () =>
                                TriggerBuilder.Create()
                                    .WithSimpleSchedule(
                                        builder =>
                                            builder.WithIntervalInSeconds(1).WithRepeatCount(2)).Build())

My app config

<quartz>
    <add key="quartz.scheduler.instanceName" value="JobScheduler" />
    <add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
    <add key="quartz.threadPool.threadCount" value="10" />
    <add key="quartz.threadPool.threadPriority" value="Normal" />
    <add key="quartz.jobStore.misfireThreshold" value="60000" />
    <add key="quartz.jobStore.type" value="Quartz.Simpl.RAMJobStore, Quartz" />
    <add key="quartz.plugin.xml.type" value="Quartz.Plugin.Xml.XMLSchedulingDataProcessorPlugin, Quartz" />
    <add key="quartz.plugin.xml.fileNames" value="~/jobs.config" />
  </quartz>

my jobs config

<?xml version="1.0" encoding="utf-8" ?>
<job-scheduling-data xmlns="http://quartznet.sourceforge.net/JobSchedulingData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0">
  <schedule>
    <job>
      <name>testjob</name>
      <group>test</group>
      <description></description>
      <job-type>cs.Operations.Jobs.SimpleJob2, cs.Operations.Jobs</job-type>
      <durable>true</durable>
      <recover>false</recover>
      <job-data-map>
        <entry>
          <key>PathToFileOrFolder</key>
          <value>c:\temp\stash\</value>
        </entry>
      </job-data-map>
    </job>
    <trigger>
      <simple>
        <name>sampleSimpleTrigger</name>
        <group>sampleSimpleGroup</group>
        <description>Simple trigger to simply fire sample job</description>
        <misfire-instruction>SmartPolicy</misfire-instruction>
        <volatile>false</volatile>
        <job-name>testjob</job-name>
        <job-group>test</job-group>
        <repeat-count>2</repeat-count>
        <repeat-interval>3000</repeat-interval>
      </simple>
    </trigger>
  </schedule>
</job-scheduling-data>

I hope you can point me in the right direction.

from topshelf.simpleinjector.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.