Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bobby 43 posts 63 karma points
    Oct 18, 2011 @ 13:57
    Bobby
    0

    Creating a Scheduler task

    Hi All,

     

    Can any one help me how can i create a schedule task in umbraco.

    I have an rss feed which display the feeds in my page, As the Rss feed is of big size i am caching the RSS feed in my Local page and display the information from the cache instead of getting from the server. The caching solution is working fine.

    Now i want to create a schedule task in umbraco and need to retrive the information from the RSS feed for every 1 hr.

    I have created the following task in the umbracosettings.config file

    <task log="true" alias="RssFeedCache" interval="180" url="http://mylocalhost/abc.aspx/rssFeed"/>

    when i check the Umbraco log table the schedule task is being started for every 180 seconds.(RssFeedCache has been called with response: True)

    but i am not sure whether am i on the rght track or not.

    Can any one help me how i can i acheive this

    Thanks 

    Bobby

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Oct 18, 2011 @ 15:24
    Ismail Mayat
    0

    Bobby,

    Is the 180 seconds just for testing as 1hr has 1800 seconds? Also when you go live you will have to update that url to your actual website url other than that you have setup scheduled task correctly.

    Regards

    Ismail

  • Bobby 43 posts 63 karma points
    Oct 20, 2011 @ 08:36
    Bobby
    0

    Hi Ismail,

     

    Its just for testing purpose i set the interval to 180 seconds. while going live wil update the correct url.Can you suggest me how i can test my application whether the scheduled task is getting the information at regular intervals.

     

    Thanks,

    Bobby

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Oct 20, 2011 @ 13:57
    Tom Fulton
    0

    It sounds like it's running according to the log - are you just wanting a way to get it's output now?  I usually use Richard's TaskScheduler package which gives you a GUI to configure the task and also has the ability to email you the output it receives from the URL.

  • David Verberckmoes 46 posts 77 karma points
    Oct 20, 2011 @ 14:15
    David Verberckmoes
    0

    Hi,

    you can add some logging to your source at start and end:

    BusinessLogic.Log.Add(BusinessLogic.LogTypes.Error,BusinessLogic.User.GetUser(0),-1,"Starting RSS feed Cache");
  • Alexander 8 posts 78 karma points c-trib
    Apr 26, 2018 @ 08:28
    Alexander
    0

    i recently wrote a little tutorial about schedule tasks, check it out and maybe it will help you to undertand better how it works. https://www.metamatrix.se/aktuellt/building-an-umbraco-schedule-task/

Please Sign in or register to post replies

Write your reply to:

Draft