Re: Looking for ideas on scheduling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris W. Parker wrote:
Hello,

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.

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.


I'm leaning towards Option 2*. What do you think? What other options do I have?

I'd go with option 2 also. Option one wouldn't really be less load, as it would be more for cron to parse, and pretty much execute the same amount of times. Option 1 also brings into question security and access. To add entries to the users crontab, your script would have to have permission to do so (suexec?), and giving it that much access could be dangerous.


--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@xxxxxxxxxxxx

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux