Howto Configure ScheduleHistoryItem Settings?

Last post 11-07-2005 2:18 AM by burtona. 9 replies.

Sort Posts:

  • Howto Configure ScheduleHistoryItem Settings?

    11-04-2004, 9:33 PM
    • Participant
      1,506 point Participant
    • DevilDog74
    • Member since 05-13-2003, 3:25 PM
    • Denver, CO
    • Posts 303
    In regards ScheduleHistoryItem there is a hashtable of settings that are stored in the DB. Get settings works and set settings probably works. Is there a user interface somewhere in DNN that allows a person to configure the settings for a schedule item?
    Did the chicken really cross the road, or did the road move beneath the chicken?
  • Re: Howto Configure ScheduleHistoryItem Settings?

    11-07-2004, 7:19 PM
    • Participant
      1,506 point Participant
    • DevilDog74
    • Member since 05-13-2003, 3:25 PM
    • Denver, CO
    • Posts 303
    Are there any takers on this topic?
    Did the chicken really cross the road, or did the road move beneath the chicken?
  • Re: Howto Configure ScheduleHistoryItem Settings?

    11-08-2004, 1:50 AM
    • Contributor
      5,654 point Contributor
    • aaava
    • Member since 07-09-2004, 2:41 AM
    • Posts 1,170
    Does anyone even have an EXPLANATION of what the heck 'Configure Schedule History Items Settings' EVEN DOES? I've been using DNN for 6 months, and this is the first I've even HEARD OF IT. I'd be very interested in the answer to this too...
  • Re: Howto Configure ScheduleHistoryItem Settings?

    11-08-2004, 6:46 AM
    • Participant
      1,506 point Participant
    • DevilDog74
    • Member since 05-13-2003, 3:25 PM
    • Denver, CO
    • Posts 303
    When a scheduled item runs, each item has it's own internal hashtable collection of settings that are read from the database and available from within the object.

    There is a GetSetting and SetSetting method, and the data is stored in the DB, but there doesnt seem to be a UI readily available to let the host set the settings. Is there (thats my question)
    Did the chicken really cross the road, or did the road move beneath the chicken?
  • Re: Howto Configure ScheduleHistoryItem Settings?

    11-08-2004, 8:57 AM
    • Contributor
      5,850 point Contributor
    • BigWebmaster
    • Member since 09-17-2002, 12:07 PM
    • Connecticut, USA
    • Posts 1,170
    There is comprehensive documentation in the /Documentation folder in the file named "DotNetNuke Scheduler.doc". But there is only a short section devoted to the task settings...regarding GetSetting and SetSetting, there is no UI for these. In the design, it was expected that any values for the task settings would be set programatically. Right now there are two deficiencies in the task settings mechanism:

    1) the SetSetting method does not work as you would expect. It doesn't save the value back out to the database. I will be making changes after DNN 3.0 is released to support saving the settings back out to the database.

    2) the GetSetting only refreshes every 10 minutes when the queue is refreshed from the database. This, too, will be fixed in a release after 3.0.

    Dan
    DotNetNuke Core Architect

  • Re: Howto Configure ScheduleHistoryItem Settings?

    11-09-2004, 4:51 AM
    • Participant
      1,506 point Participant
    • DevilDog74
    • Member since 05-13-2003, 3:25 PM
    • Denver, CO
    • Posts 303
    Dan, thanks a milliion for the clarification.

    Yes the documentation is very helpful, but it doesnt say how to set or get settings. Just that the data is stored in the DB. In anycase, I just thought that you might want to review this as well.

    Basically, there is no UniqueIndex on the SettingName, so if someone were to programatically attempt to add 2 key values with the same name, then the schedule item would fail during it's initialization code because, you cant have identical keys in a hash table. Also, since there is no Unique Index / Constraint on the field, it is perfectly legit, for an operator to create dupliucate entries in the table, and meanwhile the scheduled item will fail each time.

    Here is the exception that is logged when this particular scenario occurrs.
    Message: Item has already been added. Key in dictionary: "Test" Key being added: "Test"
    ParamName:
    InnerException:
    TargetSite: Void Insert(System.Object, System.Object, Boolean)
    StackTrace: at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) at System.Collections.Hashtable.Add(Object key, Object value) at DotNetNuke.Scheduling.SchedulingController.GetScheduleItemSettings(Int32 ScheduleID) at DotNetNuke.Scheduling.SchedulingController.GetSchedule() at DotNetNuke.Scheduling.CoreScheduler.LoadQueueFromTimer() at DotNetNuke.Scheduling.CoreScheduler.Start()
    HelpLink:
    Source: mscorlib

    I use LLBLGEn and C#, and I create a portal module control that allows my host users to set settings for scheduled items. You are more than welcome to have this code if you want to use it when making your updates in the next version. It might save you some time. Dunno.
    Did the chicken really cross the road, or did the road move beneath the chicken?
  • Crying [:'(] Re: Howto Configure ScheduleHistoryItem Settings?

    08-17-2005, 10:51 AM
    • Member
      275 point Member
    • nagscreen
    • Member since 09-28-2004, 12:57 PM
    • Uruguay
    • Posts 55

    Hi Dan,

    This works great:
       Dim myValue as String = Me.ScheduleHistoryItem.GetSetting("MyKey")
          or 
       Dim myHashTable as HashTable = Me.ScheduleHistoryItem.GetSettings


    But now on DNN 3.1, I'm still driving crazy trying to figure out how should I "write" settings for a scheduled task. 
    Currently I'm writing them directly to the database, because I cannot find  no AddSetting() or SetSetting() or SetSettings() implemented  (ScheduleItem or ScheduleHistoryItem) on the core. 
     
    Could you or someone please, please, please be so kind to tell me the right way to set settings for a scheduled task? 
    A short sample, may be? 
     
    Those are older posts regarding to the same issue, that nobody replied me anything   Crying [:'(]
       http://forums.asp.net/805574/ShowPost.aspx
       http://forums.asp.net/805274/ShowPost.aspx

    Many many many thanks in advance! Big Smile [:D]

  • Cool [cool] Re: Howto Configure ScheduleHistoryItem Settings?

    08-24-2005, 6:12 PM
    Yes, I have that same question. I am making a scheduled task to query tables each night and see if a users subscription is expired. If it is I want the scheduler to charge their credit card again. Seems simple enough...I was going to store the gateway settings in the ScheduleItemSettings table but there is not interface to do so. I am going to create my own controller and data provider to go put the settings in the core table, but it would be nice to have that added to the core.  I can merely add it to the core where it should go and send you the code and SQL Script that you can hopefully add to the core, Dan.  The problem is that for now I will need to add the code to my module until it gets added to the core since I want to resale the module. Let me know when this gets added to the core. Thanks.
  • Re: Howto Configure ScheduleHistoryItem Settings?

    08-25-2005, 10:09 PM
    • Contributor
      5,850 point Contributor
    • BigWebmaster
    • Member since 09-17-2002, 12:07 PM
    • Connecticut, USA
    • Posts 1,170
    Yes, sorry guys, this feature hasn't been added.   I had the code written for this a while ago...it was part of some other stuff I was working on.  And I cannot find it now.  It seems like a simple addition, right?  It's actually a bit tricky due to the way the scheduler works (schedule queue, multi-threading, etc.)  Enhancements like this get bumped down the list because other priorities have taken precedence like web farm support, performance enhancements, blah blah.  You know, you've heard it before ;-)  But nonetheless it needs to get done.  Is this in Gemini so we can track it?

    Dan

    DotNetNuke Core Architect

  • Re: Howto Configure ScheduleHistoryItem Settings?

    11-07-2005, 2:18 AM
    • Member
      330 point Member
    • burtona
    • Member since 02-10-2004, 8:54 AM
    • Posts 66
    Any news on this?

    Right now I have a tasks that I want to run for a specific portal and config settings. Right now, it looks like I have to write the config information directly to the DB as there is no way to easily implement a UI. This is unlike the modules where if there is a an easy way.
Page 1 of 1 (10 items)