bunkat / schedule

Automatically schedules tasks, work items, meetings, reservations, etc. Schedule takes into account working hours, holidays/days off, people's work schedule/vacation time, as well as task dependencies.
http://bunkat.github.io/schedule/
MIT License
427 stars 87 forks source link

Add demo to documentation #6

Open JasPanesar opened 9 years ago

JasPanesar commented 9 years ago

If there's a quick way to contribute this I'm happy to do so, it would be great to have a working demo right on the documentation site.

francisrod01 commented 6 years ago

I'd like to use this to schedule and unschedule something every 10 minutes, but I did not find it in doc. So.. I suggest you to add a real example in the docs.

const Scheduler = () => {

    // returns true if there’s room to schedule at ‘time’
    const couldScheduleAt = (time) => {}

    // returns true if we successfully scheduled
    const scheduleAt = (time) => {}

    // Choose an available time to schedule at, and return that time
    const schedule = () => {}

    // returns true if we successfully unscheduled something
    const unScheduleAt = (time) => {}
}