Coldfusion/MySQL Calendar insert repeat event based on day of the week.

Posted on 2007-07-23
Last Modified: 2013-12-16
I have a dynamic calendar that can be edited by my client via a login. They can add repeat events based on the day of the month say the 24th. They can also add repeat events on a daily bases. I would like to know how to go about having them be able to add a repeat event based on the day of the week, like every Wednesday using Coldfusion and MySQL. As of now each event is created as a separate entry.

Any ideas or thoughts would be greatly appreciated.
Question by:kylevn
    1 Comment
    LVL 5

    Accepted Solution

    There are 2 trends of scheduling events. Both have advantages and disadvantages and what you choose strictly depends on your requirements.

    1. Define a "master" event that caries the rules for when it is repeated. Then copy that master event into "slaves" that carry each of the occurrences (like for the next 10 years for instance). The advantage is you can modify easily one occurrence and ask the user things like: modify all future occurrences? modify only this one? etc. The obvious disadvantage is storage.

    2. Define crontab like records ( and calculate the display on the screen of an occurrence. With crontab scheduling you have very flexible rules (ranging from one time events to repetitive down to the minute). But then updating a single occurrence is difficult as you have to break the original rule into 3 separate ones: before, the occurrence, and after. The obvious advantages are storage and flexibility of scheduling.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
    Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
    The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
    The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now