0
votes

What would be a good way to create a dynamic RSS Feed? Currently, I have coded a function that is able to create a static file, but I am just curious what the best method of running this at certain times/days would be? For example, I create an RSS feed that lists all the items that occur today, and I would like it to populate at 12:01 AM. I also have another RSS feed I wrote that lists the next item to occur.

Just for clarification, I have already created the function to actually make the Feeds, I am just looking for a good way to schedule this process to run on a regular, determinable basis.

I am programming in C# on the .net 3.5 framework in VS 2008.

@John - I am using WebForms, and I don't really have a good reason for not just writing it like that, I just created the static feeds because that was what I knew how to do.

3
Why are you scheduling items instead of having the feed just show the last X most recent at the time the feed is retrieved? Also, ASP.NET MVC or Webforms? - John Sheehan

3 Answers

0
votes
0
votes

If you have access to the windows scheduler then create a script for that. If not I would create it when the page is first accessed after 12:01 and then use a caching technique for subsequent calls.

0
votes

You can accomplish this with a much easier way.

Just implement a file cache in your handler. Set the filename as the creation date of the xml, and ignore the file after desired time. The first request to rss after invalidation will get the data from your db.