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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T20:30:42+00:00 2026-06-10T20:30:42+00:00

I was reading into using Quartz http://quartznet.sourceforge.net/tutorial/lesson_3.html but I don’t understand how to implement.

  • 0

I was reading into using Quartz http://quartznet.sourceforge.net/tutorial/lesson_3.html but I don’t understand how to implement. I was also reading this https://blog.stackoverflow.com/2008/07/easy-background-tasks-in-aspnet/, also don’t understand how to implement, specifically, where do I put it and how do I access my controllers/actions?

There is a comment on the article linked above that suggests to use, "… a simple timer in global.asax." How can this be achieved?

Basically, I would like to know how (and what’s the best way) to schedule the following action on the following controller?

Public Class RssController
    Inherits System.Web.Mvc.Controller

    Function InsertRssFeedItem(ByVal url as String) As ActionResult

      ' code to get RSS and insert into database '

    End Function

End Class
  • 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-10T20:30:44+00:00Added an answer on June 10, 2026 at 8:30 pm

    I generally consider it bad practice to have a web server doing automation, I prefer that to be kept away in a service that is more suited to automated jobs.

    That said, using the above artice, I would put the section titled using Quartz.net into the application_start in global.asax

    In the application_end, shut down the job scheduler.

    Finally, in a folder, write a class like:

    c#

    public class InsertRssFeedJob : IJob
    {
         public void Execute(JobExecutionContext context)
         {
              var rssController = new RssController();
              rssController.InsertRssFeedItem("");
         }
    }
    

    vb.net

    Public Class InsertRssFeedJob
        Implements IJob
    
        Public Sub Execute(context as JobExecutionContext)
            Dim rssContoller = new RssController()
            rssController.InsertRssFeedItem("")
        End Sub
    
    End Class
    

    Sorry, I don’t know VB that well to write it outside of an IDE, so you will need to convert this c#.

     private static IScheduler _scheduler; 
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
    
            RegisterGlobalFilters(GlobalFilters.Filters);
            RegisterRoutes(RouteTable.Routes);
    
            _scheduler = new StdSchedulerFactory().GetScheduler();
    
            JobDetail jobDetail = new JobDetail("rssFeedJob", null, typeof(InsertRssFeedJob));
            // fire every hour
            Trigger trigger = TriggerUtils.MakeHourlyTrigger();
            // start on the next even hour
            trigger.StartTime = TriggerUtils.GetEvenHourDate(DateTime.UtcNow);
            trigger.Name = "myTrigger";
    
            _scheduler.ScheduleJob(jobDetail, trigger); 
    
        }
    
        protected void Application_End()
        {
            _scheduler.Shutdown();
        }
    

    Also, if the RssController needs access to any context information, you will need to get that from the HttpContext class.

    Si

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

Sidebar

Related Questions

I am looking into using Lucene.NET after reading some bad reviews of SQL Server's
I have been reading up on porting ASP.NET Membership Provider into .NET 3.5 using
I am reading in from a text file using StreamReader into a string array
I am reading the contents of the file using fread into an char array.
I'm reading Dive into Python, especially trying to understand the examples, and I had
Using C# how would I watermark an jpeg image that I'm reading into a
So looking into using memcache in my web application I am reading up about
In the comments to my answer about reading an entire file into memory using
I am doing some reading into the benefits of using the NoSQL style of
I have an xml file which I am reading into an IEnumerable using linq,

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.