Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6099355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:15:50+00:00 2026-05-23T13:15:50+00:00

I’m trying to create a remote job for scheduling in Quartz.net. When I have

  • 0

I’m trying to create a remote job for scheduling in Quartz.net. When I have a copy of the assembly containing the job locally I can do something like this

    JobDetail job = new JobDetail("remotelyAddedJob", "default", typeof(DummyJob.DummyJob));

This requires that I have a copy of the assembly containing the class DummyJob both on the server and on the computer I am creating the schedule from.

What I’d like to do is be able to create the schedule without a client-side copy of the assebmly, by sending the job-type information the way it is stored in the quartz_jobs.xml file

  <job-type>Quartz.Job.NoOpJob, Quartz</job-type>

I have not been able to figure out how to send the class type information without having a local copy. Does anyone have a good solution to this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:15:51+00:00Added an answer on May 23, 2026 at 1:15 pm

    This problem was really bugging me. I knew that I could generate classes on the fly, so I looked into how.

    Step 1: Create this class

    using System;
    using Quartz;
    using System.Reflection;
    using System.Reflection.Emit;
    
    namespace TestQuartzTaskCreator {
        public class FakeJob {
            public static Type Create(string assemblyName, string typeName){
                AssemblyName aName = new AssemblyName(assemblyName);
                AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly(
                        aName,
                        AssemblyBuilderAccess.RunAndSave);
    
                ModuleBuilder mb = ab.DefineDynamicModule(aName.Name, aName.Name + ".dll");
    
                TypeBuilder tb = mb.DefineType(typeName, TypeAttributes.Public);
    
                tb.AddInterfaceImplementation(typeof(IJob));
    
                MethodBuilder meth = tb.DefineMethod(
                    "Execute",
                    MethodAttributes.Public | MethodAttributes.Virtual,
                    typeof(void),
                    new Type[] { typeof(JobExecutionContext) });
    
                meth.DefineParameter(1,
                    ParameterAttributes.In,
                    "context");
    
                ILGenerator methIL = meth.GetILGenerator();
                methIL.Emit(OpCodes.Ldarg_0);
    
                Type t = null;
                try {
                    // Finish the type.
                    t = tb.CreateType();
                }
                catch (Exception ex) {
                    System.Console.WriteLine(ex.ToString());
                }
    
    //            ab.Save(aName.Name + ".dll");
    
                return t;
            }
        }
    }
    

    Step 2: Change from this

    JobDetail job = new JobDetail("remotelyAddedJob", "default", typeof(TestType));
    

    to this

    JobDetail job = new JobDetail("remotelyAddedJob", "default", FakeJob.Create("TestAss", "TestType"));
    

    Step 3: Run as before (but without a copy of your job assembly being referenced in the client)

    — Edit —
    While this did what I originally wanted it to, it doesn’t resolve all of the issues when using Quartz.Net from a client environment. Retrieving the job requires that the assembly be available.

    My current approach is to create a web-service interface that will reside on the same server as the service and present a more disconnected interface.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.