![]() |
Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#26
|
||||
|
||||
![]()
If your host allows cronjobs, you can just have a page with the tasks you want to perform and set it up through the cpanel ("I want this function from this file to run every day").
All the automatic tasks I've set up are basically like this: PHP Code:
To do it like HoF is saying, you can create a class file for each task you want. For example ResetClicksTask, LowerMoodTask, ... (which can extend a class Task, if you want inheritance) Each task class has a function like executeTask() that does what you want. In this case it would be like PHP Code:
PHP Code:
So when anyone visits the index, the function calls all the tasks that need to run.
__________________
![]() ![]() ![]() asp.net stole my soul. |
|
|
What's New? |
What's Hot? |
What's Popular? |