how can i make a php scheduler like this?

we are making a scheduler using php. I will explain the execution process with example. If the consultant have these times available.“1:00-2:30, 3:00 -5:00, 6:00-9:00, and 10:-11:45 to make appointment. when a client schedule a 15 minute or a 30 minute appointment then automatically five minutes will be blocked  before and after the appointment depending on if there was available time before and after the appointment fixed by the client. When the client schedules a 1 hour appointment there will be a 10 minute block. If client makes an 30 minutes appointment 3:30-4:00, then the new availability time will be 3:00 -3:25, 4:05 - 5:00. so we will get available time 3.00 to 5.00 is separated into two such 3.00 to 3.25 and 4.05 to 5.00. We have the maximum of 72 available timings per day for each consultant . For each available time we will have two available time when the appointment is fixed in between. Now how could I make a table for this kind of situation to store timing and is there any other way to work around this??
karthik80cAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
The general design pattern you're describing is called a "resource scheduling calendar."  There is an example of one in this article.  Please see Practical Application #12
http://www.experts-exchange.com/articles/20920/Handling-Time-and-Date-in-PHP-and-MySQL-OOP-Version.html

Since you want to modify the scheduled times a bit to block out some time before and after the appointment periods, you will want to learn about the DateInterval class.  Examples are given in the article.
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Vimal DMSenior Software EngineerCommented:
Hi,

1.Write whatever the login is need, in a php file
2.Secondly set that PHP file in CRON JOB of the linux hosting server

# crontab -e
00 * * * * /usr/local/bin/php /home/john/myscript.php
*/5 * * * * /usr/bin/curl -o temp.txt http://www.thegeekstuff.com/myscript.php

anything is good for executing the PHP file in cron job ...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.