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 8191953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:03:04+00:00 2026-06-07T04:03:04+00:00

I need your advice for scheduling tasks in the MVC3 Webapp. My task is

  • 0

I need your advice for scheduling tasks in the MVC3 Webapp.

My task is to create some generic scheduler for different services in the webapp that can be used later in development. For example we have some available tasks that user can schedule whenever he wants.

I didn’t want to reinvent the wheel and found the Quartz.Net library that can be used to create the scheduler.

I know that it’s not a good idea to host scheduling inside webapp cause webserver can recycle the application pools, etc, so i decided to use it inside a Windows Service and then using Quartz.NET remoting feature to trigger tasks inside my webapp.

But i’ve found some issues with that. Correct me if I’m wrong, but when i tried to use the Quartz.NET remoting it runs the job inside the Windows Service process, it means that it needs to know about all types inside my webapp, so all the assemblies of the webapp should be referenced by it, and i need to have another config file for database, etc. So in case I write new job class, i can’t easily schedule it, i need to stop the service and renew the library for it, so it’s not very generic approach.

I can’t find any info that Quartz.NET can run jobs only based on it’s interface.

So I came up with idea to write my own scheduler that will be hosted in the Windows Service, and will have some IJob interface that will be implemented in the webapp. I will also use .Net remoting using IPC channel.
So the webapp will be like .Net Remoting Server, and when i want to add some new job and then schedule it, i will just have to write new job that implements IJob interface.
I will register it as

        IpcChannel channel = new IpcChannel("CurrentIPC");

        ChannelServices.RegisterChannel(channel);

        RemotingConfiguration.RegisterWellKnownServiceType(
            typeof(SimpleJob), "SimpleJob", WellKnownObjectMode.SingleCall);
        RemotingConfiguration.RegisterWellKnownServiceType(
            typeof(ComplexObject), "ComplexObject", WellKnownObjectMode.SingleCall);

in this case i will have two Job types registered. Then when scheduling the job i will pass the name of the class and on the Windows Service side that will stand for client (executing objects on the webapp side) i will just bind the passed name of the class with IJob like this:

Dictionary<string, IJob> jobs = new Dictionary<string, IJob>();
    void AddJob(string name)
    {
        IJob obj = (IJob)Activator.GetObject(typeof(IJob), string.Format("ipc://CurrentIPC/{0}", name));
        jobs.Add(name, obj);
    }

So now i don’t need to bother about references to my app and other stuff, the scheduler will do it’s job without knowing anything, just IJob interface and executing tasks on the webapp side.

If i’m wrong or it’s too complex and there are some other simpler methods of doing this, or there are some pitfalls that i’m not aware of, can you help me with that?
Thank you.

P.S.
Also there was an idea to have separate scheduler that will run the web app methods directly by executing a link to specified service in the web app, for example “http://localhost:3030/Request/12&#8221; and that’s all, but in my web app you should be authorized to execute such request and again we have issues we need to resolve, and we will have additional load to the webserver with such requests in case of thousands of scheduled tasks.

  • 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-06-07T04:03:05+00:00Added an answer on June 7, 2026 at 4:03 am

    I think you are on the right track, I would create the scheduler using Quartz.NET and host it in a Windows Service because of the app pool recycling issue.

    It will trigger tasks/services in your webapp using specific URL:s for each task/service either in your web app or a separate web service instance.

    Using this separation the scheduler only needs to know about the urls and the schedule and does not need to reference your app directly. This is also reusable in future projects.

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

Sidebar

Related Questions

i need a experts advice that i should create separate stored procedure for every
I need your advice about framework selection (Java vs Mono) for a new large
I need your advice on this piece of code: the table fields options[0], options[1]
Basically I need your advice my good stack friends :D For the last six
I am a beginner concerning development in C# and I need your advice to
I am developing a WPF application, and I need your advice. I have to
I have no ideas how to do this, so I need your advice. I
I need your help in JAVA (with some sample code if possible) regarding to
I need your advice. I'm writing an ASP.NET web application and I'm considering whether
I need your advice deciding on a new project architecture I'm going to implement.

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.