Chris W. Parker wrote: > I'm looking to make a simple scheduler for myself and I'd like to get > some feedback on how to handle the events and their being executed at > the right time. > > The two options I've come up with both involve adding a job(s) to > crontab. > > 1. Individual jobs are added to the users crontab file. This could > result in LOTS of entries in crontab, but less load on the server. Actually, probably MORE load, as you'll be firing off *WAY* too many php processes, as soon as the schedule gets at all busy. > 2. There is one job put in the crontab file that is executed every five > minutes. This job will be executing a PHP file that runs through the > database for the current user and checks to see if any events need to go > off at that time. This will result in only one event in crontab with a > greater potential for load on the server. Actually, you might even want to create a special user with limited access/ability (or just use 'nobody') and have THAT user handle all the scheduler notifications et al. Unless you *NEED* to have the scheduler doing things on that user can do with the OS, it would be better to limit it to doing only what it NEEDS to do. Plus, you then just need one script to handle everybody, and need not worry about changes to environment settings altering script behaviour, nor permissions abuse, nor... And, of course, it's probably going to be more efficient to run just one script every five minutes that takes care of all scheduling tasks. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php