Scheduling functionality

  • Hi there,

    I want to build a generic scheduler much like the one you can use in Outlook Task/Appointment Recurrence.

    The scheduler dictates when a task should be started/assigned.

    A job should run at a given interval that determines which, if any, tasks should be started/assigned.

    I feel that the data model for something like this has probably been worked out before. Ideally, I want to download an *.mdf file and pick and choose what I can integrate.

    Anybody know of anything like that available?

    Thanks,

    -jmr

  • This was removed by the editor as SPAM

  • I have desinged several schedulers like what you mention.  If you want an example of how NOT to do it, you can look at msdb.sysjobschedules.  Yeah, it works, but what a mess.

    However, if you do look at sysjobschedules, you can get a good idea of what kind of data is required to store schedule information and build the appropriate data structures to properly manage it. 

    Bear in mind that storing the schedule information is only the first step.  Generally you will need to build a Scheduled Task table of some sort that serves as the event queue.  This table is then queried on a recurring basis to check what is the next event that needs to be run.  The logic used to populate the Scheduled Task table is a combination of the schedule tables and a calandar table that contains the business days or holidays (assuming that your schedules should be restricted to business days).

    You must also decide how often you will calculate the next scheduled run of each job (or which events will cause it to be calculated/recalculated). 

    Sorry this is so vague, but schedulers are a deceptively large subject, which might explain why many of the third-party schedulers you can purchase are so expensive...  But hopefully this gives you something to think about.

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/

  • Hi there,

    Thanks for the response.

    When thinking of how to store such data, but more importantly how to calculate any relavant information from what was stored, I realized that it wasn't going to be easy.

    I've been digging around and have found a standard defined by IETF... I believe that there is a documentation called RFC 2445:

    http://www.faqs.org/rfcs/rfc2445.html

    From here, I'm not sure where to go. For me to build a custom scheduler that has even a small percentage of the functionality of a full blown scheduler will take an exceptionally long time. I guess I'll have a look at the sysjobschedules like you suggested.

     

    -jmr

     

     

  • I can provide a basic schedule database diagram.

    /*****************

    If most people are not willing to see the difficulty, this is mainly because, consciously or unconsciously, they assume that it will be they who will settle these questions for the others, and because they are convinced of their own capacity to do this. -Friedrich August von Hayek

    *****************/

  • That would be great.

    My email address is joel_raha@hotmail.com

    Thanks,

    jmr

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply