Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Suggestions and Feature Requests (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=21)
-   -   Egg Generator (http://www.mysidiaadoptables.com/forum/showthread.php?t=4070)

bobbybig 04-30-2013 05:25 PM

This can be handled by a cron job and basically have a page built to hold all the pets to be adopted at a set number (say 25 on page at all times) you then program the cron job to check the page if it needs more pets added to the page to keep it full, and run an array and pick what pets will go in in random order. You can even go so far as to program it to value some pets over others keeping some pets as rare in the array.

The cron job can be set to run at certain times. (every 5 min on a server is a bit steep, but every 15 min or 30 min is doable on most hosts without problems)

In the admin control it can be set to allow the admin to pick the pets to go in the array, and even what pets might be rare.

In the old days we had to set up every cron job on the hosting to have them run but by todays standards cron jobs can be set up easily in code and even set up to set the times that they run in the admin control panel and all be handed from source code.

Now you ask what happens if you say set it to only fill the page ever 30 min and the pets start to run out on the page? Well this is where you also allow for members to drop eggs onto the page as well.

The only problem I see is the small bit of work the database would need to go through to keep up with what is there what was taken off and what is put on by both cron job and players.

On dragon cave I am sure that database never sleeps. lol

OK there is my 2 cents lol I will gladly add my 2 cents to making it happen.

Hall of Famer 05-01-2013 07:45 AM

Well Id say writing a cronjob code will be the better idea. Many users here will not be able to set up cronjobs from cpanel, even when I got started 3 years ago it took me a while to figure out. Considering some are actually struggling with ftp, it is a better practice to keep it as simple and convenient for users as possible.

There is a problem with cronjob code though, as they are only executed if a visitor(either human or bot) browses your site. For popular sites, it should not be a problem. For upstart sites, make sure you do not use way too frequent scheduled task at 1min or below.

bobbybig 05-01-2013 09:11 AM

Quote:

Originally Posted by Hall of Famer (Post 26834)
Well Id say writing a cronjob code will be the better idea. Many users here will not be able to set up cronjobs from cpanel, even when I got started 3 years ago it took me a while to figure out. Considering some are actually struggling with ftp, it is a better practice to keep it as simple and convenient for users as possible.

There is a problem with cronjob code though, as they are only executed if a visitor(either human or bot) browses your site. For popular sites, it should not be a problem. For upstart sites, make sure you do not use way too frequent scheduled task at 1min or below.

agreed. The code would be perfect as it only needs to fill a egg page that users need to look at. So only filling it when they look is great. Yes I know about the skill ratio of those who on average use the source hence why I mentioned the auto code as it was the better option, and like you said would only need to fire off when a visitor goes to look at the egg page. That itself would cut down on the server use and cronjobs that fire off. Hosts get upset about cronjobs that fire off too much. I will see what I have in way of sample code laying around. I am pretty sure I have one that fires off at set time or restarts the set time when a visitor shows up. I will see what I got.


All times are GMT -5. The time now is 08:47 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.